afl-fuzz-init.c, afl-fuzz.c: fix more wrong free() calls (found with

ASAN_BUILD=1 CFLAGS="-D_WANT_ORIGINAL_AFL_ALLOC -DDEBUG_BUILD")
This commit is contained in:
hexcoder-
2020-03-13 17:23:23 +01:00
parent d2787519e3
commit 746a2a0ed0
2 changed files with 3 additions and 3 deletions

View File

@ -373,7 +373,7 @@ void read_testcases(afl_state_t *afl) {
u8 passed_det = 0; u8 passed_det = 0;
ck_free(nl[i]); /* not tracked */ free(nl[i]); /* not tracked */
if (lstat(fn2, &st) || access(fn2, R_OK)) if (lstat(fn2, &st) || access(fn2, R_OK))
PFATAL("Unable to access '%s'", fn2); PFATAL("Unable to access '%s'", fn2);
@ -404,7 +404,7 @@ void read_testcases(afl_state_t *afl) {
} }
ck_free(nl); /* not tracked */ free(nl); /* not tracked */
if (!afl->queued_paths) { if (!afl->queued_paths) {

View File

@ -1173,7 +1173,7 @@ stop_fuzzing:
ck_free(afl->fsrv.target_path); ck_free(afl->fsrv.target_path);
ck_free(afl->fsrv.out_file); ck_free(afl->fsrv.out_file);
ck_free(afl->sync_id); ck_free(afl->sync_id);
ck_free(afl); free(afl); /* not tracked */
argv_cpy_free(argv); argv_cpy_free(argv);