aboutsummaryrefslogtreecommitdiffstats
path: root/rawshark.c
diff options
context:
space:
mode:
authorVasil Velichkov <vvvelichkov@gmail.com>2018-08-20 22:13:26 +0300
committerAnders Broman <a.broman58@gmail.com>2018-08-24 08:54:19 +0000
commitcdb1123b9ab727fde7d3d05ffbb3b092a8d14265 (patch)
treedc4741b4708b0eb944d9829cddf5c0e6f8bd4c78 /rawshark.c
parent3ba67f735d52d38a366e31cd8c43bca7c2947a69 (diff)
rawshark: Free pipe name and version info strings
The comp_info_str and runtime_info_str are always allocated but were only freed when the -v parameter is specified. ../test/util_dump_dhcp_pcap.py raw | valgrind --tool=memcheck --leak-check=full \ run/rawshark -r - -n -dencap:1 -R "udp.port==68" Change-Id: I6e641ae1dbb428e4dd29c2027f6a4b2305e7bcaa Reviewed-on: https://code.wireshark.org/review/29269 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'rawshark.c')
-rw-r--r--rawshark.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/rawshark.c b/rawshark.c
index 5e6f738f0d..012c6a0d54 100644
--- a/rawshark.c
+++ b/rawshark.c
@@ -697,8 +697,6 @@ main(int argc, char *argv[])
case 'v': /* Show version and exit */
{
show_version("Rawshark (Wireshark)", comp_info_str, runtime_info_str);
- g_string_free(comp_info_str, TRUE);
- g_string_free(runtime_info_str, TRUE);
goto clean_exit;
}
default:
@@ -825,6 +823,9 @@ main(int argc, char *argv[])
}
clean_exit:
+ g_free(pipe_name);
+ g_string_free(comp_info_str, TRUE);
+ g_string_free(runtime_info_str, TRUE);
epan_free(cfile.epan);
epan_cleanup();
extcap_cleanup();