diff options
author | n0p <0x90@n0p.cc> | 2019-12-27 18:50:14 +0100 |
---|---|---|
committer | n0p <0x90@n0p.cc> | 2019-12-27 18:50:14 +0100 |
commit | cc3bf762ece81fb1007bc368f4bd604804afd095 (patch) | |
tree | c8131f25d318af2165e1791e6a9750e576433db7 | |
parent | 29bbe0aebe10019fc6cc60bcc4dfd99050bfadf8 (diff) | |
download | afl++-cc3bf762ece81fb1007bc368f4bd604804afd095.tar.gz |
Fixed memory leak in afl-fuzz-python.c - trim_case_python.
-rw-r--r-- | src/afl-fuzz-python.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/afl-fuzz-python.c b/src/afl-fuzz-python.c index 73fcd138..53935698 100644 --- a/src/afl-fuzz-python.c +++ b/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(); |