From: Michael Tremer Date: Sun, 29 Jun 2025 16:39:03 +0000 (+0000) Subject: transaction: Always initialize the database pointer X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=b0d0e3e99cb18d7012143cb7f5702fa4eb261b53;p=pakfire.git transaction: Always initialize the database pointer Signed-off-by: Michael Tremer --- 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; }