about summary refs log tree commit diff
path: root/examples/custom_mutators/post_library_gif.so.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/custom_mutators/post_library_gif.so.c')
-rw-r--r--examples/custom_mutators/post_library_gif.so.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/custom_mutators/post_library_gif.so.c b/examples/custom_mutators/post_library_gif.so.c
index 2d72400c..ac10f409 100644
--- a/examples/custom_mutators/post_library_gif.so.c
+++ b/examples/custom_mutators/post_library_gif.so.c
@@ -94,7 +94,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;