From 03e55be10010ecb6292be025c45b544af37a1fa3 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 11 Jan 2025 18:44:38 +0000 Subject: [PATCH] snapshots: Return pointer without touching the reference counter Hopefully this will make the static analyzer happier. Signed-off-by: Michael Tremer --- src/pakfire/snapshot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pakfire/snapshot.c b/src/pakfire/snapshot.c index f3df0fdf1..e1a238c40 100644 --- a/src/pakfire/snapshot.c +++ b/src/pakfire/snapshot.c @@ -113,11 +113,11 @@ int pakfire_snapshot_create( } // Return the snapshot - *snapshot = pakfire_snapshot_ref(s); + *snapshot = s; + return 0; ERROR: - if (s) - pakfire_snapshot_unref(s); + pakfire_snapshot_free(s); return r; } -- 2.47.3