From 5d7dc3cbc1ec8ef5609bf77c6f7e79b732dd1e90 Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Tue, 4 May 2021 13:48:04 +0200 Subject: [PATCH] Fixes memleak in user_options_check_files() See https://github.com/hashcat/hashcat/pull/2671 --- src/user_options.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/user_options.c b/src/user_options.c index 8a6ce76a7..e81996e39 100644 --- a/src/user_options.c +++ b/src/user_options.c @@ -2933,8 +2933,12 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx) { event_log_error (hashcat_ctx, "%s: %s", temp_filename, strerror (errno)); + hcfree (temp_filename); + return -1; } + + hcfree (temp_filename); } // return back to the folder we came from initially (workaround)