diff options
author | Mikael Kanstrup <mikael.kanstrup@gmail.com> | 2016-09-08 14:26:58 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2016-09-12 12:13:41 +0000 |
commit | c64762d33c3a9cbc4af4040284534b440d12b210 (patch) | |
tree | cd1f29e92e31ba93e19281575a1b8d4eeda7fd51 /extcap.h | |
parent | e079862fad331cba874717ec1d0af9e35ba438b5 (diff) |
extcap: Fix misc memory leaks triggered by network interface changes
Valgrind reports plenty of misc memory leaks in extcap after the network
interface list has changed or is refreshed. Errors can be seen by
starting Wireshark with Valgrind's memcheck tool and bringing a network
interface up and down a few times with:
ifconfig eth0 up
ifconfig eth0 down
Change-Id: I90f53847071854b7d02facb39b7a380732de79b4
Reviewed-on: https://code.wireshark.org/review/17606
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'extcap.h')
-rw-r--r-- | extcap.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -88,6 +88,15 @@ extcap_tools_list(void); GList * extcap_get_if_configuration(const char * ifname); +/** + * Frees the memory from extcap_get_if_configuration. + * @param list The list returned by extcap_get_if_configuration. + * @param free_args TRUE if all arguments in the list must be freed too or FALSE + * if the ownership of the arguments is taken by the caller. + */ +void +extcap_free_if_configuration(GList *list, gboolean free_args); + gboolean extcap_has_configuration(const char * ifname, gboolean is_required); |