summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/cache.c')
-rw-r--r--lib/libalpm/cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/cache.c b/lib/libalpm/cache.c
index 20d3ed5b..8c8e7669 100644
--- a/lib/libalpm/cache.c
+++ b/lib/libalpm/cache.c
@@ -74,7 +74,7 @@ int db_load_pkgcache(pmdb_t *db)
void db_free_pkgcache(pmdb_t *db)
{
- if(db == NULL) {
+ if(db == NULL || db->pkgcache == NULL) {
return;
}
@@ -213,7 +213,7 @@ void db_free_grpcache(pmdb_t *db)
{
PMList *lg;
- if(db == NULL) {
+ if(db == NULL || db->grpcache == NULL) {
return;
}