]> git.ipfire.org Git - pakfire.git/commitdiff
snapshot: Ensure that pointer it always reset
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 23 Oct 2024 11:35:38 +0000 (11:35 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 23 Oct 2024 11:35:38 +0000 (11:35 +0000)
Even if something else keeps holding a reference to the snapshot.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/snapshot.c

index cdd12210ae20e0d9bfab99e13a0e0f8ddb71df1b..9117582756e01689ff1a3a2425848ac03b9cdfbc 100644 (file)
@@ -586,7 +586,8 @@ int pakfire_snapshot_clean(struct pakfire* pakfire) {
                        goto ERROR;
 
                // Free the snapshot
-               snapshot = pakfire_snapshot_unref(snapshot);
+               pakfire_snapshot_unref(snapshot);
+               snapshot = NULL;
        }
 
 ERROR: