aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2013-10-10 14:53:19 +0000
committerJeff Morriss <jeff.morriss.ws@gmail.com>2013-10-10 14:53:19 +0000
commitbcf51e813132b628898705e09c0e3992876aaec1 (patch)
tree67bb5832b268bd29f4827eb1f207f349d5ee5d6d /tshark.c
parent36e0adfcc1cea7532bb7f1c5a843ab3a662ff154 (diff)
Fix the core dump reported in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9258 :
After calling wtap_close(), set the wth to NULL so we don't try to close it again later. (The core only happens when tshark isn't keeping up with dumpcap's file rotation.) Wireshark still has a problem but it's a different one. svn path=/trunk/; revision=52493
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tshark.c b/tshark.c
index ba73d1a70e..961c8abcbf 100644
--- a/tshark.c
+++ b/tshark.c
@@ -2503,6 +2503,7 @@ capture_input_new_file(capture_session *cap_session, gchar *new_file)
if ( ((capture_file *) cap_session->cf)->state != FILE_CLOSED) {
if ( ((capture_file *) cap_session->cf)->wth != NULL) {
wtap_close(((capture_file *) cap_session->cf)->wth);
+ ((capture_file *) cap_session->cf)->wth = NULL;
}
((capture_file *) cap_session->cf)->state = FILE_CLOSED;
}