Fix the core dump reported in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id...
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 10 Oct 2013 14:53:19 +0000 (14:53 +0000)
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 10 Oct 2013 14:53:19 +0000 (14:53 +0000)
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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@52493 f5534014-38df-0310-8fa8-9805f1628bb7

tshark.c

index ba73d1a70e46841e55350218647d52083a22b5a9..961c8abcbf1182e3cf52b43d65d7059a78d1c363 100644 (file)
--- 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;
     }