aboutsummaryrefslogtreecommitdiffstats
path: root/capchild
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2018-01-16 17:05:54 +0100
committerGerald Combs <gerald@wireshark.org>2018-01-16 18:58:11 +0000
commit634ba24b0aca74a547503556f89a6928cb89ee20 (patch)
tree947abbf3db2784a036352c7ffd1601600fa3f6fc /capchild
parentd77d5c9d206a1c395ac4762938d6ddf19e92f314 (diff)
capchild: free memory on error.
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>
Diffstat (limited to 'capchild')
-rw-r--r--capchild/capture_sync.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/capchild/capture_sync.c b/capchild/capture_sync.c
index 1588a5648e..be3180a1ae 100644
--- a/capchild/capture_sync.c
+++ b/capchild/capture_sync.c
@@ -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.