Merge pull request #1075 from philsmd/master

mp: memory checks added to avoid leaks
This commit is contained in:
Jens Steube
2017-02-14 16:51:29 +01:00
committed by GitHub
2 changed files with 5 additions and 7 deletions
+1
View File
@@ -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 hash-file writing (caused by --remove) failed
- 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 Kernel: Move kernel binary buffer from heap to stack memory
- Outfile Check: Fixed a memory leak for failed outfile reads
+4 -7
View File
@@ -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);
if (rc == -1)
{
hcfree (mask_truncated);
hcfree (mask_truncated);
return -1;
}
if (rc == -1) return -1;
}
}
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);
if (rc == -1) return -1;
hcfree (prepend_mask);
if (rc == -1) return -1;
}
else
{