extcap: fix memory leak
authorMax Dmitrichenko <dmitrmax@gmail.com>
Wed, 19 Apr 2017 21:36:48 +0000 (17:36 -0400)
committerRoland Knall <rknall@gmail.com>
Wed, 19 Apr 2017 22:32:58 +0000 (22:32 +0000)
found by valgrind

Change-Id: I8c5226a08be797ce72ec937138a6681d946fb13c
Reviewed-on: https://code.wireshark.org/review/20720
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
extcap.c

index 8a07f9837152e954e97f4f2cfd28c44b838d53e5..87ec4f5d00291d925e1e324efe3ec21f3dc96296 100644 (file)
--- a/extcap.c
+++ b/extcap.c
@@ -1388,7 +1388,7 @@ static void remove_extcap_entry(gpointer entry, gpointer data _U_)
     extcap_interface *int_iter = (extcap_interface*)entry;
 
     if (int_iter->if_type == EXTCAP_SENTENCE_EXTCAP)
     extcap_interface *int_iter = (extcap_interface*)entry;
 
     if (int_iter->if_type == EXTCAP_SENTENCE_EXTCAP)
-        g_free(int_iter);
+        extcap_free_interface(entry);
 }
 
 static gboolean cb_load_interfaces(extcap_callback_info_t cb_info)
 }
 
 static gboolean cb_load_interfaces(extcap_callback_info_t cb_info)