From 247446539704aee99f64e73a77e5e88a40ae885a Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Fri, 30 Jun 2017 00:32:25 +0200 Subject: dumpcap: fix minor memory leak at begin of capture While "os_info_str" is freed after the loop, "cpu_info_str" was leaked. Change-Id: Ia4069403c0a5dd5cc6bd7ed61726c1bfa9736b19 Reviewed-on: https://code.wireshark.org/review/22465 Reviewed-by: Anders Broman --- dumpcap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dumpcap.c b/dumpcap.c index a1d20722db..6f28630b7f 100644 --- a/dumpcap.c +++ b/dumpcap.c @@ -2508,6 +2508,7 @@ capture_loop_init_output(capture_options *capture_opts, loop_data *ld, char *err -1, /* section_length */ &ld->bytes_written, &err); + g_string_free(cpu_info_str, TRUE); g_free(appname); for (i = 0; successful && (i < capture_opts->ifaces->len); i++) { @@ -3009,6 +3010,7 @@ do_file_switch_or_stop(capture_options *capture_opts, -1, /* section_length */ &(global_ld.bytes_written), &global_ld.err); + g_string_free(cpu_info_str, TRUE); g_free(appname); for (i = 0; successful && (i < capture_opts->ifaces->len); i++) { -- cgit v1.2.1