summaryrefslogtreecommitdiff
path: root/src/util/pactree.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/pactree.c')
-rw-r--r--src/util/pactree.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/pactree.c b/src/util/pactree.c
index 0c1710f6..9125f581 100644
--- a/src/util/pactree.c
+++ b/src/util/pactree.c
@@ -472,7 +472,7 @@ static void walk_deps(alpm_list_t *dblist, alpm_pkg_t *pkg, tdepth *depth, int r
depth->next = &d;
/* last dep, cut off the limb here */
if(last){
- if(depth->prev){
+ if(depth->prev) {
depth->prev->next = &d;
d.prev = depth->prev;
depth = &d;
@@ -488,6 +488,8 @@ static void walk_deps(alpm_list_t *dblist, alpm_pkg_t *pkg, tdepth *depth, int r
if(rev) {
FREELIST(deps);
+ } else {
+ alpm_list_free(deps);
}
}