Fixed memory leak in afl-fuzz-python.c - trim_case_python.
MODIFY
src/afl-fuzz-python.c
src/afl-fuzz-python.c
@@ -345,7 +345,10 @@ u8 trim_case_python(char** argv, struct queue_entry* q, u8* in_buf) {
fault = run_target(argv, exec_tmout);
++trim_execs;
- if (stop_soon || fault == FAULT_ERROR) goto abort_trimming;
+ if (stop_soon || fault == FAULT_ERROR) {
+ free(retbuf);
+ goto abort_trimming;
+ }
cksum = hash32(trace_bits, MAP_SIZE, HASH_CONST);
@@ -381,6 +384,8 @@ u8 trim_case_python(char** argv, struct queue_entry* q, u8* in_buf) {
}
+ free(retbuf);
+
/* Since this can be slow, update the screen every now and then. */
if (!(trim_exec++ % stats_update_freq)) show_stats();

Fixed memory leak in afl-fuzz-python.c - trim_case_python.