mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-08 16:21:32 +00:00
fix two mem leaks detected by cppcheck
This commit is contained in:
parent
14e76cf3c9
commit
ffe41e6fce
@ -37,6 +37,7 @@ my_mutator_t *afl_custom_init(afl_state_t *afl, unsigned int seed) {
|
||||
|
||||
if ((data->mutator_buf = malloc(MAX_FILE)) == NULL) {
|
||||
|
||||
free(data);
|
||||
perror("mutator_buf alloc");
|
||||
return NULL;
|
||||
|
||||
|
@ -50,6 +50,7 @@ extern "C" my_mutator_t *afl_custom_init(afl_state_t *afl, unsigned int seed) {
|
||||
|
||||
if ((data->mutator_buf = (u8 *)malloc(MAX_FILE)) == NULL) {
|
||||
|
||||
free(data);
|
||||
perror("mutator_buf alloc");
|
||||
return NULL;
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 0bf26f6c2601e1c1c84998551ed7d50b4108fbdf
|
||||
Subproject commit c6d6647161a32bae88785a618fcd828d1711d9e6
|
Loading…
x
Reference in New Issue
Block a user