From 521c819842805801b57eb7d5c226750aa064af94 Mon Sep 17 00:00:00 2001 From: jsteube Date: Tue, 14 Feb 2017 12:42:22 +0100 Subject: [PATCH] CPU Affinity: Fixed memory leak when invalid cpu Id was specified --- docs/changes.txt | 1 + src/affinity.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index 748b94d61..2bd1e9a13 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -58,6 +58,7 @@ - Building: Removed the use of RPATH on linker level - Building: Replaced linking of CRT_glob.o with the use of int _dowildcard - Commandline: Do some checks related to custom-charset options if user specifies them +- CPU Affinity: Fixed memory leak when invalid cpu Id was specified - Events: Improved the maximum event message handling. event_log () will now also internally make sure that the message is properly terminated - Files: Do several file and folder checks on startup rather than when they are actually used to avoid related error after eventual intense operations - Helper: Added functions to check existence, type, read- and write-permissions and rewrite sources to use them instead of stat() diff --git a/src/affinity.c b/src/affinity.c index 8461ac33c..158e1d80b 100644 --- a/src/affinity.c +++ b/src/affinity.c @@ -86,6 +86,8 @@ int set_cpu_affinity (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx) { event_log_error (hashcat_ctx, "Invalid cpu_id %d specified", cpu_id); + hcfree (devices); + return (-1); }