1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-14 03:39:09 +00:00

Fixes memleak in user_options_check_files()

See https://github.com/hashcat/hashcat/pull/2669
This commit is contained in:
Jens Steube 2021-05-04 13:53:50 +02:00
parent 5d7dc3cbc1
commit 4930105ce3

View File

@ -2824,9 +2824,13 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
event_log_warning (hashcat_ctx, "For example, using \"7z e\" instead of using \"7z x\".");
event_log_warning (hashcat_ctx, NULL);
hcfree (modulefile);
return -1;
}
hcfree (modulefile);
const bool quiet_save = user_options->quiet;
user_options->quiet = true;
@ -2839,8 +2843,6 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
hashconfig_destroy (hashcat_ctx);
hcfree (modulefile);
// same check but for an backend kernel
char *kernelfile = (char *) hcmalloc (HCBUFSIZ_TINY);
@ -2855,6 +2857,8 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
event_log_warning (hashcat_ctx, "For example, using \"7z e\" instead of using \"7z x\".");
event_log_warning (hashcat_ctx, NULL);
hcfree (kernelfile);
return -1;
}