capchild: free memory on error.
authorDario Lombardo <lomato@gmail.com>
Tue, 16 Jan 2018 16:05:54 +0000 (17:05 +0100)
committerGerald Combs <gerald@wireshark.org>
Tue, 16 Jan 2018 18:58:11 +0000 (18:58 +0000)
Change-Id: If2cd8d344dced80b16789744a0b504c505ba0824
Reviewed-on: https://code.wireshark.org/review/25344
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
capchild/capture_sync.c

index 1588a5648e37fce16b5932aee3be269fe72cfc51..be3180a1ae4d76860d178bb4f10afb11a95c74f1 100644 (file)
@@ -1350,8 +1350,10 @@ sync_interface_stats_open(int *data_read_fd, ws_process_id *fork_child, gchar **
 #endif
     ret = sync_pipe_open_command(argv, data_read_fd, &message_read_fd,
                                  fork_child, msg, update_cb);
-    if (ret == -1)
+    if (ret == -1) {
+        g_free(argv);
         return -1;
+    }
 
     /*
      * We were able to set up to read dumpcap's output.  Do so.