Wireshark-dev: Re: [Wireshark-dev] Freeing memory when quitting Wireshark

From: Alex Lindberg <alindber@xxxxxxxxx>
Date: Wed, 3 Aug 2011 15:01:55 -0700 (PDT)
It turns out there where several issues.  All dealing with preferences.

1 - UAT_END_FIELD not included in the uat_field_t structure. (Did not break Linux, but windows was not so kind.)
2 - In my call to prefs_register_protocol( my_proto, callback_fn) if callback_fn was NULL, wireshark/tshark would close correctly.  If not NULL then  wireshark  and tshark would remain in memory when closed. Again windows only.  Linux was OK.

I have not determined why when the callback function was included, the system failed to close.  The callback only updated some memory tables with the new info from the uat_new structure.

Any ideas on where to look?

Thanks as always.
Alex Lindberg

--- On Tue, 8/2/11, Alex Lindberg <alindber@xxxxxxxxx> wrote:

From: Alex Lindberg <alindber@xxxxxxxxx>
Subject: [Wireshark-dev] Freeing memory when quitting Wireshark
To: wireshark-dev@xxxxxxxxxxxxx
Date: Tuesday, August 2, 2011, 2:21 PM

When I quit a custom build of Wireshark (Win32), although the application disappears from the desktop, it remains in memory.

I use g_regex for a number of dissectors.  In previous versions I was using the PCRE library and did not have this issue.

When Wireshark quits, is there a "un-register" routing that is called in the dissector?  I am suspecting that I am not releasing all my memory from the compiled g_regex_new functions.

Thanks as always.
Alex Lindberg

-----Inline Attachment Follows-----

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe