Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
FAIL:
if (f)
fclose(f);
- pakfire_config_unref(config);
+ if (config)
+ pakfire_config_unref(config);
return r;
}
FAIL:
if (f)
fclose(f);
- pakfire_config_unref(config);
+ if (config)
+ pakfire_config_unref(config);
return r;
}
}
static int test_add_package(const struct test* t) {
+ struct pakfire_package* package = NULL;
struct pakfire_db* db = NULL;
struct pakfire_repo* repo = NULL;
struct pakfire_archive* archive = NULL;
ASSERT_SUCCESS(pakfire_archive_open(&archive, t->pakfire, path));
ASSERT(archive);
- struct pakfire_package* package = NULL;
-
// Get package
ASSERT_SUCCESS(pakfire_archive_make_package(archive, repo, &package));
ASSERT(package);