diff --git a/src/hashes.c b/src/hashes.c index 86f9740ab..d8dd14d29 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 72906e846..f2502bac7 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 e6834511d..6773c3d96 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 dd866e6c4..98f68977a 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 b2131313d..fb0f5ee41 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 099b3e0e5..30e283d7c 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 a26dac667..7632a605e 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 7e59b30e0..8285937b2 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 fc0124c3c..abae8da11 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 0e88e15b6..58464a6a0 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 3ffb6fe9f..0f7c6dd3b 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 98b081416..f9c0c59b8 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 af318305a..1a57a9a84 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 037bd5940..711671689 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 5a8465ced..caa648c94 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 589be1f66..87921b4a3 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 c5f375352..090b148c9 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 b17e22383..3329b4fbf 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 675db5514..e47dcf5ce 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 4eb6b39c5..f153a5304 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 3b84699dd..abb36e7b5 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 b74eb5d0b..a27b3be7c 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 c75b54c25..bdcb6287a 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 c4f4c8165..325217e78 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 2b64b8c3c..c60db177e 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 db59b7da4..63a9b46ae 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 24a542653..02e07adad 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 8617b90ab..6bb9d3213 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 dd3385d3d..a6e386955 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 3c4376e88..545b7eeaa 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 9e1e94fd0..2323a8921 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 390477186..0f754cfa4 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 458091fe4..699467afe 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 5d3f58c25..656b9a854 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 11fde9771..761ce03eb 100644 --- a/src/shared.c +++ b/src/shared.c @@ -511,7 +511,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;