From b0d0e3e99cb18d7012143cb7f5702fa4eb261b53 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 29 Jun 2025 16:39:03 +0000 Subject: [PATCH] transaction: Always initialize the database pointer Signed-off-by: Michael Tremer --- src/pakfire/transaction.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pakfire/transaction.c b/src/pakfire/transaction.c index 25538339..f5ad108d 100644 --- a/src/pakfire/transaction.c +++ b/src/pakfire/transaction.c @@ -1863,7 +1863,7 @@ static int pakfire_usrmove(pakfire_ctx* ctx, pakfire_root* root) { static int pakfire_transaction_perform(pakfire_transaction* self) { pakfire_repo* repo = NULL; pakfire_jail* jail = NULL; - pakfire_db* db; + pakfire_db* db = NULL; size_t total_size = 0; int r; @@ -1941,7 +1941,8 @@ ERROR: pakfire_jail_unref(jail); if (repo) pakfire_repo_unref(repo); - pakfire_db_unref(db); + if (db) + pakfire_db_unref(db); return r; } -- 2.47.2