aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2021-05-22 19:01:22 -0700
committerGuy Harris <gharris@sonic.net>2021-05-23 02:23:09 +0000
commit54b89521507cb335f59e3b21d0e4716b83f16530 (patch)
tree42995ce1ab81557fe4b086ea10a96913e30f5539
parent93e794c373510b5d5f53ef9382d5f1a548f63db6 (diff)
Plug another leak.
If cf_export_specified_packets() succeeds, and it wrote to a temporary file, it leaks the name of the file to which it was writing. Free that after we've renamed that file on top of the target file (safe save). (cherry picked from commit 8ca86b29bfa4780b17e6d15ab1f382f6f79a5065)
-rw-r--r--file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/file.c b/file.c
index f992592896..47443f7f15 100644
--- a/file.c
+++ b/file.c
@@ -4907,6 +4907,7 @@ cf_export_specified_packets(capture_file *cf, const char *fname,
cf_rename_failure_alert_box(fname, errno);
goto fail;
}
+ g_free(fname_new);
}
return CF_WRITE_OK;