Free capture filename on shutdown
authorkrj <krj@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 26 Sep 2009 06:41:20 +0000 (06:41 +0000)
committerkrj <krj@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 26 Sep 2009 06:41:20 +0000 (06:41 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30165 f5534014-38df-0310-8fa8-9805f1628bb7

tshark.c

index 87e0b063968d1bb7888aa4f580ad4856e8654a80..3cef9e486c17d4dbcaf083c62a5d679596c7c79b 100644 (file)
--- a/tshark.c
+++ b/tshark.c
@@ -1560,7 +1560,6 @@ main(int argc, char *argv[])
       epan_cleanup();
       exit(2);
     }
-    cf_name[0] = '\0';
   } else {
     /* No capture file specified, so we're supposed to do a live capture
        (or get a list of link-layer types for a live capture device);
@@ -1629,6 +1628,8 @@ main(int argc, char *argv[])
 #endif
   }
 
+  g_free(cf_name);
+
 #if GLIB_CHECK_VERSION(2,10,0)
   if (cfile.plist_start != NULL)
     g_slice_free_chain(frame_data, cfile.plist_start, next);