From Evan Huus:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 11 Jun 2012 07:14:52 +0000 (07:14 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 11 Jun 2012 07:14:52 +0000 (07:14 +0000)
Airpcap memory leak.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7352

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@43198 f5534014-38df-0310-8fa8-9805f1628bb7

airpcap_loader.c

index f20a88d401733e5c4fa3bc1ec9069f871394f2c6..4102da1df7747b4ab73bff4e3dab57ee1924039c 100644 (file)
@@ -1582,14 +1582,12 @@ airpcap_get_if_string_number_from_description(gchar* description)
 airpcap_if_info_t*
 airpcap_get_default_if(GList* airpcap_if_list)
 {
-    gchar* s;
     airpcap_if_info_t* if_info = NULL;
 
     if(prefs.capture_device != NULL)
     {
-       s = g_strdup(get_if_name(prefs.capture_device));
-       if_info = get_airpcap_if_from_name(airpcap_if_list,g_strdup(get_if_name(prefs.capture_device)));
-       g_free(s);
+        if_info = get_airpcap_if_from_name(airpcap_if_list,
+                                           get_if_name(prefs.capture_device));
     }
     return if_info;
 }