index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2011-09-19 14:27:21 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-09-20 10:23:10 -0500 |
commit | 37961648486ca44a92eefe454cd6f1f091c4fe6d (patch) | |
tree | c86240b85ecb17d183090284f8da1954addb571c /lib/libalpm/db.c | |
parent | 95119d46d486168e7fddd5e8eece93be8e9ca719 (diff) |
-rw-r--r-- | lib/libalpm/db.c | 6 |
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c index 765448df..7708d18f 100644 --- a/lib/libalpm/db.c +++ b/lib/libalpm/db.c @@ -508,9 +508,11 @@ void _alpm_db_free_pkgcache(alpm_db_t *db) _alpm_log(db->handle, ALPM_LOG_DEBUG, "freeing package cache for repository '%s'\n", db->treename); - alpm_list_free_inner(_alpm_db_get_pkgcache(db), + if(db->pkgcache) { + alpm_list_free_inner(db->pkgcache->list, (alpm_list_fn_free)_alpm_pkg_free); - _alpm_pkghash_free(db->pkgcache); + _alpm_pkghash_free(db->pkgcache); + } db->status &= ~DB_STATUS_PKGCACHE; free_groupcache(db); |