fix a bug if capturing into named files is used
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 7 Feb 2005 20:38:10 +0000 (20:38 +0000)
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 7 Feb 2005 20:38:10 +0000 (20:38 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13345 f5534014-38df-0310-8fa8-9805f1628bb7

capture.c

index f1cf38c5eb506749089ab0647160a9829927c72c..b200de889c955a20969554ca073903d892f25b11 100644 (file)
--- a/capture.c
+++ b/capture.c
@@ -397,7 +397,9 @@ capture_open_output(capture_options *capture_opts, gboolean *is_tempfile) {
 
   /* close the old file */
   cf_close(capture_opts->cf);
-  g_assert(capture_opts->save_file == NULL);
+  if(capture_opts->save_file != NULL) {
+    g_free(capture_opts->save_file);
+  }
   capture_opts->save_file = capfile_name;
   /* capture_opts.save_file is "g_free"ed later, which is equivalent to
      "g_free(capfile_name)". */