summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2017-06-30 00:32:25 +0200
committerAnders Broman <a.broman58@gmail.com>2017-06-30 03:50:35 +0000
commit247446539704aee99f64e73a77e5e88a40ae885a (patch)
tree60e1c24a6018287592a1f75aeed96c538f8cf1c7
parent8f8a0f72b442efe66c7ee26417a92508a1546289 (diff)
downloadwireshark-247446539704aee99f64e73a77e5e88a40ae885a.tar.gz
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 <a.broman58@gmail.com>
-rw-r--r--dumpcap.c2
1 files changed, 2 insertions, 0 deletions
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++) {