mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-16 11:58:08 +00:00
free memory when shutdown
With this fix, ASAN_BUILD won't report leaks if ctrl-c (in a short run).
This commit is contained in:
@ -766,6 +766,7 @@ void destroy_queue(afl_state_t *afl) {
|
|||||||
for (i = 0; i < afl->queued_items; i++) {
|
for (i = 0; i < afl->queued_items; i++) {
|
||||||
|
|
||||||
q = afl->queue_buf[i];
|
q = afl->queue_buf[i];
|
||||||
|
ck_free(q->testcase_buf);
|
||||||
ck_free(q->fname);
|
ck_free(q->fname);
|
||||||
ck_free(q->trace_mini);
|
ck_free(q->trace_mini);
|
||||||
if (q->skipdet_e) {
|
if (q->skipdet_e) {
|
||||||
|
@ -773,6 +773,11 @@ void afl_state_deinit(afl_state_t *afl) {
|
|||||||
ck_free(afl->first_trace);
|
ck_free(afl->first_trace);
|
||||||
ck_free(afl->map_tmp_buf);
|
ck_free(afl->map_tmp_buf);
|
||||||
|
|
||||||
|
ck_free(afl->skipdet_g->inf_prof);
|
||||||
|
ck_free(afl->skipdet_g->virgin_det_bits);
|
||||||
|
ck_free(afl->skipdet_g);
|
||||||
|
ck_free(afl->havoc_prof);
|
||||||
|
|
||||||
list_remove(&afl_states, afl);
|
list_remove(&afl_states, afl);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user