mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-26 09:58:16 +00:00
mp: memory checks added to avoid leaks
This commit is contained in:
parent
259f8f6bb2
commit
437289c41e
@ -68,6 +68,7 @@
|
|||||||
- Hardware Monitor: Fixed several memory leaks in case no hardware monitor sensor is found
|
- Hardware Monitor: Fixed several memory leaks in case no hardware monitor sensor is found
|
||||||
- Hardware Monitor: Fixed several memory leaks in case hash-file writing (caused by --remove) failed
|
- Hardware Monitor: Fixed several memory leaks in case hash-file writing (caused by --remove) failed
|
||||||
- Mask Increment: Fixed memory leak in case mask_append() fails
|
- Mask Increment: Fixed memory leak in case mask_append() fails
|
||||||
|
- Mask Checks: Added additional memory cleanups after parsing/verifying masks
|
||||||
- OpenCL Device Management: Fixed several memory leaks in case initialization of an OpenCL device or platform failed
|
- OpenCL Device Management: Fixed several memory leaks in case initialization of an OpenCL device or platform failed
|
||||||
- Outfile Check: Fixed a memory leak for failed outfile reads
|
- Outfile Check: Fixed a memory leak for failed outfile reads
|
||||||
- Rule Engine: Fixed several memory leaks in case loading of rules failed
|
- Rule Engine: Fixed several memory leaks in case loading of rules failed
|
||||||
|
11
src/mpsp.c
11
src/mpsp.c
@ -976,12 +976,9 @@ static int mask_append (hashcat_ctx_t *hashcat_ctx, const char *mask, const char
|
|||||||
|
|
||||||
const int rc = mask_append_final (hashcat_ctx, mask_truncated);
|
const int rc = mask_append_final (hashcat_ctx, mask_truncated);
|
||||||
|
|
||||||
if (rc == -1)
|
hcfree (mask_truncated);
|
||||||
{
|
|
||||||
hcfree (mask_truncated);
|
|
||||||
|
|
||||||
return -1;
|
if (rc == -1) return -1;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -996,9 +993,9 @@ static int mask_append (hashcat_ctx_t *hashcat_ctx, const char *mask, const char
|
|||||||
|
|
||||||
const int rc = mask_append_final (hashcat_ctx, prepend_mask);
|
const int rc = mask_append_final (hashcat_ctx, prepend_mask);
|
||||||
|
|
||||||
if (rc == -1) return -1;
|
|
||||||
|
|
||||||
hcfree (prepend_mask);
|
hcfree (prepend_mask);
|
||||||
|
|
||||||
|
if (rc == -1) return -1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user