file: Free fname_new when rename successful.

Plug a memory leak.
This commit is contained in:
John Thacker 2022-05-31 22:08:13 -04:00 committed by A Wireshark GitLab Utility
parent 0d2e248a25
commit 356a6ab0ea
1 changed files with 1 additions and 0 deletions

1
file.c
View File

@ -4932,6 +4932,7 @@ cf_save_records(capture_file *cf, const char *fname, guint save_format,
#endif
goto fail;
}
g_free(fname_new);
}
/* If this was a temporary file, and we didn't do the save by doing