aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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.