Centralize hashcat_ctx memory allocation and deallocation

This commit is contained in:
jsteube
2016-10-02 00:00:21 +02:00
parent d0e3b858c8
commit 9413ed8f56
25 changed files with 136 additions and 298 deletions

View File

@@ -32,16 +32,9 @@ void loopback_init (loopback_ctx_t *loopback_ctx, const user_options_t *user_opt
void loopback_destroy (loopback_ctx_t *loopback_ctx)
{
if (loopback_ctx->enabled == false)
{
myfree (loopback_ctx);
if (loopback_ctx->enabled == false) return;
return;
}
myfree (loopback_ctx->filename);
myfree (loopback_ctx);
memset (loopback_ctx, 0, sizeof (loopback_ctx_t));
}
int loopback_write_open (loopback_ctx_t *loopback_ctx, const induct_ctx_t *induct_ctx)