summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/cache.c
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2006-01-16 23:27:09 +0100
committerAurelien Foret <aurelien@archlinux.org>2006-01-16 23:27:09 +0100
commit6e5a62dd128b6036eaa35f9b010a35120548e3db (patch)
tree1d419961d1eb80c57aa771756f41e59da145e8db /lib/libalpm/cache.c
parent9b2f0607d566bf95bbe14da6747771f7314bbbdc (diff)
downloadpacman-6e5a62dd128b6036eaa35f9b010a35120548e3db.tar.gz
pacman-6e5a62dd128b6036eaa35f9b010a35120548e3db.tar.xz
more code cleanup
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;
}