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:
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…
Reference in New Issue
Block a user