aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2017-02-04 16:37:08 +0100
committerDario Lombardo <lomato@gmail.com>2017-02-14 13:25:39 +0000
commit415580b060541217798b272faf53aaaf4f483df8 (patch)
treecceed02c62b1c7ced00bffd63986c709dfd1fb50 /tshark.c
parent4b423c5fb1fdc6a329dc74f0f8a1920e13c5f933 (diff)
tshark: free capture file filename on exit.
Change-Id: I561bc7b46ad8582013d3897ae19801d2fc5a7f49 Reviewed-on: https://code.wireshark.org/review/19950 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: Dario Lombardo <lomato@gmail.com>
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tshark.c b/tshark.c
index f02cb33c72..470da75992 100644
--- a/tshark.c
+++ b/tshark.c
@@ -2203,6 +2203,7 @@ clean_exit:
col_cleanup(&cfile.cinfo);
free_filter_lists();
wtap_cleanup();
+ cf_close(&cfile);
return exit_status;
}
@@ -4078,6 +4079,12 @@ write_finale(void)
}
}
+void
+cf_close(capture_file *cf)
+{
+ g_free(cf->filename);
+}
+
cf_status_t
cf_open(capture_file *cf, const char *fname, unsigned int type, gboolean is_tempfile, int *err)
{