summaryrefslogtreecommitdiff
path: root/tshark.c
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2017-02-09 18:06:45 +0100
committerDario Lombardo <lomato@gmail.com>2017-02-27 13:25:26 +0000
commita29fe9d76afe04ae80caebfb4239d3b5a8318183 (patch)
tree03404d190869439aebb119f1e58f0b82a4cee2dd /tshark.c
parentd4cf57100ce10930551b1985eac77e78bae6361d (diff)
downloadwireshark-a29fe9d76afe04ae80caebfb4239d3b5a8318183.tar.gz
print_stream: free memory on exit.
Change-Id: I6c4acaa9026cfdf1d4230c28c30bccfb6c025cef Reviewed-on: https://code.wireshark.org/review/19920 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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tshark.c b/tshark.c
index 678523f6f8..2321b8bbd8 100644
--- a/tshark.c
+++ b/tshark.c
@@ -185,7 +185,7 @@ static gboolean line_buffered;
static gboolean really_quiet = FALSE;
static print_format_e print_format = PR_FMT_TEXT;
-static print_stream_t *print_stream;
+static print_stream_t *print_stream = NULL;
static output_fields_t* output_fields = NULL;
static gchar **protocolfilter = NULL;
@@ -2205,6 +2205,7 @@ main(int argc, char *argv[])
output_fields = NULL;
clean_exit:
+ destroy_print_stream(print_stream);
#ifdef HAVE_LIBPCAP
capture_opts_cleanup(&global_capture_opts);
#endif