extcap: Fix crash in extcap_verify_capture_filter
authorStig Bjørlykke <stig@bjorlykke.org>
Wed, 11 Apr 2018 07:22:13 +0000 (09:22 +0200)
committerStig Bjørlykke <stig@bjorlykke.org>
Wed, 11 Apr 2018 07:28:17 +0000 (07:28 +0000)
This fixes a regression issue from g57fed5d1 when freeing the
arguments passed to extcap.

Change-Id: Ic4d6a129569f9e691fd2608e0229342b8b5e9783
Reviewed-on: https://code.wireshark.org/review/26870
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
extcap.c

index eb3837820f27190537570f293625f45fac4cf4d7..c5f446a6d097e03ce275d046d05be6c5e4231ded 100644 (file)
--- a/extcap.c
+++ b/extcap.c
@@ -1019,9 +1019,9 @@ extcap_verify_capture_filter(const char *ifname, const char *filter, gchar **err
         g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_DEBUG, "Extcap path %s",
               get_extcap_dir());
 
-        arguments = g_list_append(arguments, EXTCAP_ARGUMENT_CAPTURE_FILTER);
+        arguments = g_list_append(arguments, g_strdup(EXTCAP_ARGUMENT_CAPTURE_FILTER));
         arguments = g_list_append(arguments, g_strdup(filter));
-        arguments = g_list_append(arguments, EXTCAP_ARGUMENT_INTERFACE);
+        arguments = g_list_append(arguments, g_strdup(EXTCAP_ARGUMENT_INTERFACE));
         arguments = g_list_append(arguments, g_strdup(ifname));
 
         extcap_callback_info_t cb_info;