aboutsummaryrefslogtreecommitdiffstats
path: root/capture.c
diff options
context:
space:
mode:
Diffstat (limited to 'capture.c')
-rw-r--r--capture.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/capture.c b/capture.c
index f1cf38c5eb..b200de889c 100644
--- 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)". */