forked from osmocom/wireshark
tshark: fix memleak from version lookup
Immediately release memory after using it, fixes a direct memleak warning from ASAN. Change-Id: Icd3ff19c607da790a4a093966e1966cb0df6bb9d Reviewed-on: https://code.wireshark.org/review/9069 Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
d85a221cd3
commit
2b68a6f450
7
tshark.c
7
tshark.c
|
@ -1085,6 +1085,8 @@ DIAG_ON(cast-qual)
|
|||
"\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);
|
||||
|
||||
/*
|
||||
* In order to have the -X opts assigned before the wslua machine starts
|
||||
|
@ -1652,7 +1654,9 @@ DIAG_ON(cast-qual)
|
|||
}
|
||||
break;
|
||||
case 'v': /* Show version and exit */
|
||||
{
|
||||
comp_info_str = get_compiled_version_info(get_tshark_compiled_version_info,
|
||||
epan_get_compiled_version_info);
|
||||
runtime_info_str = get_runtime_version_info(get_tshark_runtime_version_info);
|
||||
show_version("TShark (Wireshark)", comp_info_str, runtime_info_str);
|
||||
g_string_free(comp_info_str, TRUE);
|
||||
g_string_free(runtime_info_str, TRUE);
|
||||
|
@ -1663,7 +1667,6 @@ DIAG_ON(cast-qual)
|
|||
* much more useful. */
|
||||
epan_cleanup();
|
||||
return 0;
|
||||
}
|
||||
case 'O': /* Only output these protocols */
|
||||
/* already processed; just ignore it now */
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue