summaryrefslogtreecommitdiff
path: root/text2pcap.c
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2016-09-10 01:27:28 +0200
committerPeter Wu <peter@lekensteyn.nl>2016-09-10 13:00:22 +0000
commite5fef1d73e687807ae1df40979ffc5a65dda03cc (patch)
tree5d220881bf0dde6ec2a9a192b5c99d08136e79b6 /text2pcap.c
parent4b05159dfec9e3e4495982e70803d7d49c13f54b (diff)
downloadwireshark-e5fef1d73e687807ae1df40979ffc5a65dda03cc.tar.gz
Fix version-string releated memleak for some CLI tools
These programs resulted on a memleak report on exit. Change-Id: I630618f50d723b7af4cb00ba29671d4e7c6fcdc2 Reviewed-on: https://code.wireshark.org/review/17623 Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'text2pcap.c')
-rw-r--r--text2pcap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/text2pcap.c b/text2pcap.c
index d364984d62..855df5e54c 100644
--- a/text2pcap.c
+++ b/text2pcap.c
@@ -1467,6 +1467,8 @@ parse_options (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);
/* Scan CLI parameters */
while ((c = getopt_long(argc, argv, "aDdhqe:i:l:m:no:u:s:S:t:T:v4:6:", long_options, NULL)) != -1) {
@@ -1675,6 +1677,8 @@ parse_options (int argc, char *argv[])
break;
case 'v':
+ comp_info_str = get_compiled_version_info(NULL, NULL);
+ runtime_info_str = get_runtime_version_info(NULL);
show_version("Text2pcap (Wireshark)", comp_info_str, runtime_info_str);
g_string_free(comp_info_str, TRUE);
g_string_free(runtime_info_str, TRUE);