From ce0debf94f93d787d3bed635952133b2a5ff3551 Mon Sep 17 00:00:00 2001 From: Steve Grubb Date: Tue, 26 Mar 2019 17:24:37 -0400 Subject: [PATCH 2/2] Fix memleak in auparse caused by corrected event ordering part 2 --- auparse/auparse.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git auparse/auparse.c auparse/auparse.c index ecea88e..5318d25 100644 --- auparse/auparse.c +++ auparse/auparse.c @@ -259,23 +259,6 @@ static event_list_t *au_get_ready_event(auparse_state_t *au, int is_test) if (lowest && lowest->status == EBS_COMPLETE) { lowest->status = EBS_EMPTY; au->au_ready--; - // Try to consolidate the array so that we iterate - // over a smaller portion next time - if (lowest == &lol->array[lol->maxi]) { - au_lolnode *ptr = lowest; - while (ptr->status == EBS_EMPTY && lol->maxi > 0) { - lol->maxi--; - if (ptr->l) { - aup_list_clear(ptr->l); - free(ptr->l); - ptr->l = NULL; - au->le = NULL; // this should crash - // usage of au->le - // until reset - } - ptr = &lol->array[lol->maxi]; - } - } return lowest->l; } -- 2.24.0