diff options
author | Peter Wu <peter@lekensteyn.nl> | 2016-09-11 11:25:51 +0200 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-09-11 12:39:14 +0000 |
commit | 456312e22b06dd900ce11776f35321c0a158ea7e (patch) | |
tree | 69a4b0e2b8c04dbf8583d8201696af0c093c5de4 /dumpcap.c | |
parent | 583150198b78c84d043455b0afcca58a9659eab3 (diff) |
dumpcap: fix memleak on exit
Invocation of tshark -D (dumpcap -D -Z none) under ASAN fails with:
tshark: Child dumpcap process died: Abort - core dumped
Change-Id: Ida363089066205d579e841b019b32c2e33516f12
Reviewed-on: https://code.wireshark.org/review/17633
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'dumpcap.c')
-rw-r--r-- | dumpcap.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -3802,6 +3802,8 @@ main(int argc, char *argv[]) "\n" "%s", get_ws_vcs_version_info(), comp_info_str->str, runtime_info_str->str); + g_string_free(comp_info_str, TRUE); + g_string_free(runtime_info_str, TRUE); #ifdef _WIN32 arg_list_utf_16to8(argc, argv); @@ -4102,13 +4104,13 @@ main(int argc, char *argv[]) exit_main(0); break; case 'v': /* Show version and exit */ - { + comp_info_str = get_compiled_version_info(NULL, get_dumpcap_compiled_info); + runtime_info_str = get_runtime_version_info(get_dumpcap_runtime_info); show_version("Dumpcap (Wireshark)", comp_info_str, runtime_info_str); g_string_free(comp_info_str, TRUE); g_string_free(runtime_info_str, TRUE); exit_main(0); break; - } /*** capture option specific ***/ case 'a': /* autostop criteria */ case 'b': /* Ringbuffer option */ |