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

pull/1075/head
jsteube 7 years ago
parent c859cff25c
commit 2824192cc5

@ -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
}

Loading…
Cancel
Save