afl-common.c: fix my error: argv is a copy (ck_alloc based)

Now unicorn_mode works with ASAN_BUILD and _WANT_ORIGINAL_AFL_ALLOC
and DEBUG_BUILD also.
This commit is contained in:
hexcoder-
2020-03-13 20:37:39 +01:00
parent 746a2a0ed0
commit 08fe1e2cd7

View File

@ -76,7 +76,7 @@ void detect_file_args(char **argv, u8 *prog_in, u8 *use_stdin) {
} else {
n_arg = alloc_printf("%s%s/%s%s", argv[i], cwd, prog_in, aa_loc + 2);
}
free(argv[i]);
ck_free(argv[i]);
argv[i] = n_arg;
}