1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-27 17:08:12 +00:00

Fix several memory leaks in pidfile handling in case a hashcat instance is already running

This commit is contained in:
jsteube 2017-02-14 16:40:08 +01:00
parent c859cff25c
commit 2824192cc5

View File

@ -46,6 +46,10 @@ static int check_running_process (hashcat_ctx_t *hashcat_ctx)
{
event_log_error (hashcat_ctx, "Already an instance running on pid %u", pd->pid);
hcfree (pd);
hcfree (pidbin);
return -1;
}
@ -70,12 +74,17 @@ static int check_running_process (hashcat_ctx_t *hashcat_ctx)
{
event_log_error (hashcat_ctx, "Already an instance %s running on pid %d", pidbin2, pd->pid);
hcfree (pd);
hcfree (pidbin);
hcfree (pidbin2);
return -1;
}
}
hcfree (pidbin2);
hcfree (pidbin);
hcfree (pidbin2);
#endif
}