summaryrefslogtreecommitdiff
path: root/lib/libalpm/cache.c
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-03-28 07:45:24 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-03-28 07:45:24 +0000
commit0ef95757d6fed29b99d1ea08b78732b2a7fe0e2c (patch)
tree533229e29f3d37f6cad859b97cc2d2d9b2dce6fd /lib/libalpm/cache.c
parent350a3972d1d372a009c67aba5af4ff0d3e25e813 (diff)
downloadpacman-0ef95757d6fed29b99d1ea08b78732b2a7fe0e2c.tar.xz
added a FREELISTPTR macro to free a PMList without freeing its data
Diffstat (limited to 'lib/libalpm/cache.c')
-rw-r--r--lib/libalpm/cache.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/libalpm/cache.c b/lib/libalpm/cache.c
index c6b298eb..09d508a8 100644
--- a/lib/libalpm/cache.c
+++ b/lib/libalpm/cache.c
@@ -156,13 +156,9 @@ void db_free_grpcache(pmdb_t *db)
}
for(lg = db->grpcache; lg; lg = lg->next) {
- PMList *lp;
pmgrp_t *grp = lg->data;
- for(lp = grp->packages; lp; lp = lp->next) {
- lp->data = NULL;
- }
- FREELIST(grp->packages);
+ FREELISTPTR(grp->packages);
FREEGRP(lg->data);
}
FREELIST(db->grpcache);