summaryrefslogtreecommitdiffstats
path: root/src/cc4group.c
diff options
context:
space:
mode:
authorMarkus Mittendrein <git@maxmitti.tk>2019-08-31 12:50:17 +0200
committerMarkus Mittendrein <git@maxmitti.tk>2019-08-31 12:50:17 +0200
commit4fc01f7685ea96d5d3dce29ab467bae39255600d (patch)
tree1295f07d03c8f3ff98d89f3b799ac04c497c0d77 /src/cc4group.c
parentb244716b70a7142b4eb2e1ac830274ae249c14ff (diff)
downloadcc4group-4fc01f7685ea96d5d3dce29ab467bae39255600d.tar.gz
cc4group-4fc01f7685ea96d5d3dce29ab467bae39255600d.zip
Destroy the readState's cleanupJobs outside of the foreach
Diffstat (limited to 'src/cc4group.c')
-rw-r--r--src/cc4group.c2
1 files changed, 1 insertions, 1 deletions
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)