aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-02-07 20:38:10 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-02-07 20:38:10 +0000
commitd2cf31dc22989c0d7180a41b42a5bf51e3279fea (patch)
tree1bdad7a3bce7c959d83a4fb52f31b59f360887ca
parent30a00ead9339d958c0f941eda6e251fcc8a7a37e (diff)
fix a bug if capturing into named files is used
svn path=/trunk/; revision=13345
-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)". */