From 8ca86b29bfa4780b17e6d15ab1f382f6f79a5065 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 22 May 2021 19:01:22 -0700 Subject: [PATCH] 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). --- file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/file.c b/file.c index 17255c67e9..17a01ce0d0 100644 --- a/file.c +++ b/file.c @@ -4902,6 +4902,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;