From 4fc01f7685ea96d5d3dce29ab467bae39255600d Mon Sep 17 00:00:00 2001 From: Markus Mittendrein Date: Sat, 31 Aug 2019 12:50:17 +0200 Subject: Destroy the readState's cleanupJobs outside of the foreach --- src/cc4group.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/cc4group.c b/src/cc4group.c index b5f443c..93dbd3d 100644 --- a/src/cc4group.c +++ b/src/cc4group.c @@ -610,6 +610,7 @@ static void cc4group_cleanupReadState(CC4Group* const this) { job->value.func(job->value.data); } + CleanUpJobListDestroy(this->readState.cleanupJobs); this->readState.cleanupJobs = NULL; if(this->readState.lastData != NULL && this->lazy) @@ -1203,7 +1204,6 @@ static void cc4group_init(CC4Group* const this) this->readState.active = false; this->readState.lastData = NULL; this->readState.cleanupJobs = CleanUpJobListNew(); - AddCleanUpJob(CleanUpJobListDestroy, this->readState.cleanupJobs); } static bool cc4group_setMakerRecursively(CC4Group* const this, const C4GroupEntryData* groupEntry, const char* const maker) -- cgit v1.2.3-54-g00ecf