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-22 19:01:22 -0700
commit8ca86b29bfa4780b17e6d15ab1f382f6f79a5065 (patch)
treec11a240b78533116ba4c3a0a7da340362fd52c33
parent15026157949b394a71feaed61f968aa692d20885 (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).
-rw-r--r--file.c1
1 files changed, 1 insertions, 0 deletions
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;