From 4a4c14c9a926a75a52d3775098211cf3a89e0a7d Mon Sep 17 00:00:00 2001 From: hexcoder- Date: Thu, 12 Nov 2020 23:47:49 +0100 Subject: more fixes, leaks and compile errors --- examples/custom_mutators/post_library_png.so.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'examples/custom_mutators/post_library_png.so.c') diff --git a/examples/custom_mutators/post_library_png.so.c b/examples/custom_mutators/post_library_png.so.c index 7c1ea93e..941f7e55 100644 --- a/examples/custom_mutators/post_library_png.so.c +++ b/examples/custom_mutators/post_library_png.so.c @@ -54,7 +54,13 @@ void *afl_custom_init(void *afl) { } state->buf = calloc(sizeof(unsigned char), 4096); - if (!state->buf) { return NULL; } + if (!state->buf) { + + free(state); + perror("calloc"); + return NULL; + + } return state; -- cgit 1.4.1