]> git.ipfire.org Git - pakfire.git/commitdiff
tests: db: Initialize package to avoid SEGV on early fails
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 27 Oct 2024 08:59:06 +0000 (08:59 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 27 Oct 2024 11:37:55 +0000 (11:37 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tests/libpakfire/db.c

index 795790b89ea27a455c4f131d658b84e0e28f3aa2..909a9ab2545296a775bd3bff13ca2358b2e13de2 100644 (file)
@@ -82,6 +82,7 @@ static int test_add_package(const struct test* t) {
        struct pakfire_db* db = NULL;
        struct pakfire_repo* repo = NULL;
        struct pakfire_archive* archive = NULL;
+       struct pakfire_package* package = NULL;
        int r = EXIT_FAILURE;
 
        ASSERT(repo = pakfire_get_repo(t->pakfire, PAKFIRE_REPO_DUMMY));