Fix leaks when stopping afl (#228)

This commit is contained in:
Dominik Maier
2020-03-05 20:23:04 +01:00
committed by GitHub
parent 90409f383a
commit 3ac568c40c
2 changed files with 3 additions and 1 deletions

View File

@ -156,6 +156,7 @@ char** get_qemu_argv(u8* own_loc, char** argv, int argc) {
if (!access(BIN_PATH "/afl-qemu-trace", X_OK)) {
ck_free(cp);
target_path = new_argv[0] = ck_strdup(BIN_PATH "/afl-qemu-trace");
return new_argv;

View File

@ -643,7 +643,7 @@ void sync_fuzzers(char** argv) {
fault = run_target(argv, exec_tmout);
if (stop_soon) return;
if (stop_soon) goto close_sync;
syncing_party = sd_ent->d_name;
queued_imported += save_if_interesting(argv, mem, st.st_size, fault);
@ -662,6 +662,7 @@ void sync_fuzzers(char** argv) {
ck_write(id_fd, &next_min_accept, sizeof(u32), qd_synced_path);
close_sync:
close(id_fd);
closedir(qd);
ck_free(qd_path);