diff --git a/src/hashes.c b/src/hashes.c index 789bcd630..bcfa2c1a1 100644 --- a/src/hashes.c +++ b/src/hashes.c @@ -182,8 +182,8 @@ int save_hash (hashcat_ctx_t *hashcat_ctx) { event_log_error (hashcat_ctx, "%s: %s", new_hashfile, strerror (errno)); - free (new_hashfile); - free (old_hashfile); + hcfree (new_hashfile); + hcfree (old_hashfile); return -1; } @@ -194,8 +194,8 @@ int save_hash (hashcat_ctx_t *hashcat_ctx) event_log_error (hashcat_ctx, "%s: %s", new_hashfile, strerror (errno)); - free (new_hashfile); - free (old_hashfile); + hcfree (new_hashfile); + hcfree (old_hashfile); return -1; } @@ -256,8 +256,8 @@ int save_hash (hashcat_ctx_t *hashcat_ctx) event_log_error (hashcat_ctx, "%s: %s", new_hashfile, strerror (errno)); - free (new_hashfile); - free (old_hashfile); + hcfree (new_hashfile); + hcfree (old_hashfile); return -1; } @@ -270,8 +270,8 @@ int save_hash (hashcat_ctx_t *hashcat_ctx) { event_log_error (hashcat_ctx, "Rename file '%s' to '%s': %s", hashfile, old_hashfile, strerror (errno)); - free (new_hashfile); - free (old_hashfile); + hcfree (new_hashfile); + hcfree (old_hashfile); return -1; } @@ -282,16 +282,16 @@ int save_hash (hashcat_ctx_t *hashcat_ctx) { event_log_error (hashcat_ctx, "Rename file '%s' to '%s': %s", new_hashfile, hashfile, strerror (errno)); - free (new_hashfile); - free (old_hashfile); + hcfree (new_hashfile); + hcfree (old_hashfile); return -1; } unlink (old_hashfile); - free (new_hashfile); - free (old_hashfile); + hcfree (new_hashfile); + hcfree (old_hashfile); return 0; } diff --git a/src/hlfmt.c b/src/hlfmt.c index 68ea27c82..0e803445b 100644 --- a/src/hlfmt.c +++ b/src/hlfmt.c @@ -374,7 +374,7 @@ u32 hlfmt_detect (hashcat_ctx_t *hashcat_ctx, HCFILE *fp, u32 max_check) hashlist_format = i; } - free (formats_cnt); + hcfree (formats_cnt); return hashlist_format; } diff --git a/src/modules/module_06211.c b/src/modules/module_06211.c index ef63c4be4..70c43e63f 100644 --- a/src/modules/module_06211.c +++ b/src/modules/module_06211.c @@ -199,7 +199,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_06212.c b/src/modules/module_06212.c index a2f6fc4bf..5f3cb9597 100644 --- a/src/modules/module_06212.c +++ b/src/modules/module_06212.c @@ -199,7 +199,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_06213.c b/src/modules/module_06213.c index 0cdbd43c5..9f85117a8 100644 --- a/src/modules/module_06213.c +++ b/src/modules/module_06213.c @@ -197,7 +197,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_06221.c b/src/modules/module_06221.c index 2744b6b37..64fae66c1 100644 --- a/src/modules/module_06221.c +++ b/src/modules/module_06221.c @@ -181,7 +181,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_06222.c b/src/modules/module_06222.c index d4314e47f..664f36655 100644 --- a/src/modules/module_06222.c +++ b/src/modules/module_06222.c @@ -181,7 +181,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_06223.c b/src/modules/module_06223.c index ec19b3c56..908ad4ccf 100644 --- a/src/modules/module_06223.c +++ b/src/modules/module_06223.c @@ -179,7 +179,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_06231.c b/src/modules/module_06231.c index e86e09b69..612459b16 100644 --- a/src/modules/module_06231.c +++ b/src/modules/module_06231.c @@ -180,7 +180,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_06232.c b/src/modules/module_06232.c index 847c2c3e9..7601055d5 100644 --- a/src/modules/module_06232.c +++ b/src/modules/module_06232.c @@ -180,7 +180,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_06233.c b/src/modules/module_06233.c index 080976adf..f222af937 100644 --- a/src/modules/module_06233.c +++ b/src/modules/module_06233.c @@ -180,7 +180,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_06241.c b/src/modules/module_06241.c index 4ff957c71..de3172b36 100644 --- a/src/modules/module_06241.c +++ b/src/modules/module_06241.c @@ -193,7 +193,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_06242.c b/src/modules/module_06242.c index 048df78b1..8540769d9 100644 --- a/src/modules/module_06242.c +++ b/src/modules/module_06242.c @@ -193,7 +193,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_06243.c b/src/modules/module_06243.c index 2ee532815..eee606304 100644 --- a/src/modules/module_06243.c +++ b/src/modules/module_06243.c @@ -193,7 +193,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_13711.c b/src/modules/module_13711.c index 2096bd458..00e9ca7f2 100644 --- a/src/modules/module_13711.c +++ b/src/modules/module_13711.c @@ -209,7 +209,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_13712.c b/src/modules/module_13712.c index 8a5f1cf13..08be501aa 100644 --- a/src/modules/module_13712.c +++ b/src/modules/module_13712.c @@ -209,7 +209,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_13713.c b/src/modules/module_13713.c index 7a5360837..8ea246d70 100644 --- a/src/modules/module_13713.c +++ b/src/modules/module_13713.c @@ -209,7 +209,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_13721.c b/src/modules/module_13721.c index 9680018f1..92a4fc182 100644 --- a/src/modules/module_13721.c +++ b/src/modules/module_13721.c @@ -210,7 +210,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_13722.c b/src/modules/module_13722.c index 88b7c0862..695dbe140 100644 --- a/src/modules/module_13722.c +++ b/src/modules/module_13722.c @@ -210,7 +210,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_13723.c b/src/modules/module_13723.c index bf90814ed..0c2bc5edd 100644 --- a/src/modules/module_13723.c +++ b/src/modules/module_13723.c @@ -210,7 +210,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_13731.c b/src/modules/module_13731.c index ab2885331..9b8040b89 100644 --- a/src/modules/module_13731.c +++ b/src/modules/module_13731.c @@ -209,7 +209,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_13732.c b/src/modules/module_13732.c index 7ba12cfca..aaf7e1ea1 100644 --- a/src/modules/module_13732.c +++ b/src/modules/module_13732.c @@ -209,7 +209,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_13733.c b/src/modules/module_13733.c index 2dfac5939..20d8dae95 100644 --- a/src/modules/module_13733.c +++ b/src/modules/module_13733.c @@ -209,7 +209,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_13741.c b/src/modules/module_13741.c index e819dc268..f33448db6 100644 --- a/src/modules/module_13741.c +++ b/src/modules/module_13741.c @@ -211,7 +211,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_13742.c b/src/modules/module_13742.c index 42f09c216..7105841f5 100644 --- a/src/modules/module_13742.c +++ b/src/modules/module_13742.c @@ -211,7 +211,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_13743.c b/src/modules/module_13743.c index 0c3e07a8b..fdd60b216 100644 --- a/src/modules/module_13743.c +++ b/src/modules/module_13743.c @@ -211,7 +211,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_13751.c b/src/modules/module_13751.c index df3dab805..e68c39c3d 100644 --- a/src/modules/module_13751.c +++ b/src/modules/module_13751.c @@ -228,7 +228,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_13752.c b/src/modules/module_13752.c index c2675a0e1..ec52ee3ef 100644 --- a/src/modules/module_13752.c +++ b/src/modules/module_13752.c @@ -228,7 +228,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_13753.c b/src/modules/module_13753.c index df061adce..1a06ef978 100644 --- a/src/modules/module_13753.c +++ b/src/modules/module_13753.c @@ -228,7 +228,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_13761.c b/src/modules/module_13761.c index d121c9928..ae6c1b666 100644 --- a/src/modules/module_13761.c +++ b/src/modules/module_13761.c @@ -230,7 +230,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_13762.c b/src/modules/module_13762.c index a772f9180..1f5cb4ab2 100644 --- a/src/modules/module_13762.c +++ b/src/modules/module_13762.c @@ -230,7 +230,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_13763.c b/src/modules/module_13763.c index 885e9c1c6..a0dd1fd86 100644 --- a/src/modules/module_13763.c +++ b/src/modules/module_13763.c @@ -230,7 +230,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_13771.c b/src/modules/module_13771.c index 21ab8fc58..f61d44336 100644 --- a/src/modules/module_13771.c +++ b/src/modules/module_13771.c @@ -213,7 +213,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_13772.c b/src/modules/module_13772.c index ce9a1edd8..ad9f1fb7b 100644 --- a/src/modules/module_13772.c +++ b/src/modules/module_13772.c @@ -213,7 +213,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/modules/module_13773.c b/src/modules/module_13773.c index ed658c123..8cfd75ac4 100644 --- a/src/modules/module_13773.c +++ b/src/modules/module_13773.c @@ -213,7 +213,7 @@ int module_hash_binary_parse (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE keyfile = strtok_r ((char *) NULL, ",", &saveptr); } - free (keyfiles); + hcfree (keyfiles); } // keyboard layout mapping diff --git a/src/shared.c b/src/shared.c index 8b59d600f..19f3e7e26 100644 --- a/src/shared.c +++ b/src/shared.c @@ -507,7 +507,7 @@ void setup_environment_variables (const folder_config_t *folder_config) putenv (display); - free (display); + hcfree (display); } else { diff --git a/src/status.c b/src/status.c index 26407519e..ebae643cc 100644 --- a/src/status.c +++ b/src/status.c @@ -323,7 +323,7 @@ char *status_get_hash_target (const hashcat_ctx_t *hashcat_ctx) tmp_buf2[tmp_len] = 0; - free (tmp_buf); + hcfree (tmp_buf); return tmp_buf2; } @@ -343,7 +343,7 @@ char *status_get_hash_target (const hashcat_ctx_t *hashcat_ctx) char *tmp_buf2 = strdup (tmp_buf); - free (tmp_buf); + hcfree (tmp_buf); return tmp_buf2; } @@ -1097,14 +1097,14 @@ char *status_get_time_estimated_relative (const hashcat_ctx_t *hashcat_ctx) snprintf (display, HCBUFSIZ_TINY, "%s; Runtime limited: %s", tmp_display, display_left); - free (display_left); + hcfree (display_left); } else { snprintf (display, HCBUFSIZ_TINY, "%s; Runtime limit exceeded", tmp_display); } - free (tmp_display); + hcfree (tmp_display); } return display; diff --git a/src/terminal.c b/src/terminal.c index fb68608a7..411c5b36f 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -1068,7 +1068,7 @@ void status_display_status_json (hashcat_ctx_t *hashcat_ctx) printf (" \"rejected\": %" PRIu64 ",", hashcat_status->progress_rejected); printf (" \"devices\": ["); - free (target_json_encoded); + hcfree (target_json_encoded); int device_num = 0;