Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/cache.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-04-26 21:08:34 -0400
committerDan McGee <dan@archlinux.org>2007-04-28 02:59:58 -0400
commita3491224df3209563b68cc45b9b2d8ab747d208a (patch)
tree46f0b25b5c457479cc937e10957562ce751cd9fd /lib/libalpm/cache.c
parent0984dab1f2b7beae455518b06aa5675890e01d9c (diff)
Remove FREEPKG macro and correctly type _alpm_pkg_free
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/cache.c')
-rw-r--r--lib/libalpm/cache.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libalpm/cache.c b/lib/libalpm/cache.c
index 632a9bbd..72825c00 100644
--- a/lib/libalpm/cache.c
+++ b/lib/libalpm/cache.c
@@ -84,7 +84,11 @@ void _alpm_db_free_pkgcache(pmdb_t *db)
_alpm_log(PM_LOG_DEBUG, _("freeing package cache for repository '%s'"),
db->treename);
- FREELISTPKGS(db->pkgcache);
+ alpm_list_t *tmp;
+ for(tmp = db->pkgcache; tmp; tmp = alpm_list_next(tmp)) {
+ _alpm_pkg_free(tmp->data);
+ }
+ db->pkgcache = NULL;
if(db->grpcache) {
_alpm_db_free_grpcache(db);
@@ -157,7 +161,7 @@ int _alpm_db_remove_pkgfromcache(pmdb_t *db, pmpkg_t *pkg)
return(-1);
}
- FREEPKG(data);
+ _alpm_pkg_free(data);
_alpm_db_free_grpcache(db);