mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-12 18:18:07 +00:00
Fix leaks when stopping afl (#228)
This commit is contained in:
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user