]> git.ipfire.org Git - pakfire.git/commitdiff
pakfire: Initialize pointer to db so that we don't try to free it on error
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 30 Aug 2022 18:13:36 +0000 (18:13 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 30 Aug 2022 18:13:36 +0000 (18:13 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/pakfire.c

index 4dffb035b0ae10f81df18c4a225fc1c864402d7f..3482bd2aec1c78592c59e3937c8e067641d3080d 100644 (file)
@@ -253,7 +253,7 @@ static Id pakfire_namespace_callback(Pool* pool, void* data, Id ns, Id id) {
 }
 
 static int pakfire_populate_pool(struct pakfire* pakfire) {
-       struct pakfire_db* db;
+       struct pakfire_db* db = NULL;
        struct pakfire_repo* commandline = NULL;
        struct pakfire_repo* dummy = NULL;
        struct pakfire_repo* system = NULL;