]> git.ipfire.org Git - pakfire.git/commitdiff
libpakfire: Fix releasing memory in correct order
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 20 May 2017 13:10:41 +0000 (15:10 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 20 May 2017 13:10:41 +0000 (15:10 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/repo.c

index e5d5b3595313806e67f7089942d5961227e938ed..8c2686deb2e3971e641379ec115249b9bf9442ce 100644 (file)
@@ -112,10 +112,10 @@ void pakfire_repo_free(PakfireRepo repo) {
        // Free repodata.
        repodata_free(repo->filelist);
 
-       pakfire_free(repo);
-
        if (repo->cache)
                pakfire_repocache_free(repo->cache);
+
+       pakfire_free(repo);
 }
 
 PakfirePool pakfire_repo_pool(PakfireRepo repo) {