diff options
author | Peter Wu <peter@lekensteyn.nl> | 2017-06-30 00:32:25 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-06-30 03:50:35 +0000 |
commit | 247446539704aee99f64e73a77e5e88a40ae885a (patch) | |
tree | 60e1c24a6018287592a1f75aeed96c538f8cf1c7 /dumpcap.c | |
parent | 8f8a0f72b442efe66c7ee26417a92508a1546289 (diff) |
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>
Diffstat (limited to 'dumpcap.c')
-rw-r--r-- | dumpcap.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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++) { |