From 347408167681c8e4475d884938affc85a93cad9d Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 23 Oct 2024 11:35:38 +0000 Subject: [PATCH] snapshot: Ensure that pointer it always reset Even if something else keeps holding a reference to the snapshot. Signed-off-by: Michael Tremer --- src/libpakfire/snapshot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libpakfire/snapshot.c b/src/libpakfire/snapshot.c index cdd12210a..911758275 100644 --- a/src/libpakfire/snapshot.c +++ b/src/libpakfire/snapshot.c @@ -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: -- 2.39.5