summaryrefslogtreecommitdiff
path: root/lib/libalpm/remove.c
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2006-01-15 15:55:16 +0000
committerAurelien Foret <aurelien@archlinux.org>2006-01-15 15:55:16 +0000
commit6dd2ecf4fa19346193e4ea69419c1b1004fb66e8 (patch)
tree94d206e257e204f41a5344a2b56e4f31e94a06d2 /lib/libalpm/remove.c
parent83839f95132624f385c66eb9a4fc354c21ae7025 (diff)
downloadpacman-6dd2ecf4fa19346193e4ea69419c1b1004fb66e8.tar.xz
pulled out conflict checkings from checkdeps() in its own function: checkconflicts()
Diffstat (limited to 'lib/libalpm/remove.c')
-rw-r--r--lib/libalpm/remove.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c
index 5b7fd418..3e810203 100644
--- a/lib/libalpm/remove.c
+++ b/lib/libalpm/remove.c
@@ -83,7 +83,8 @@ int remove_prepare(pmtrans_t *trans, pmdb_t *db, PMList **data)
EVENT(trans, PM_TRANS_EVT_CHECKDEPS_START, NULL, NULL);
_alpm_log(PM_LOG_FLOW1, "looking for unsatisfied dependencies");
- if((lp = checkdeps(db, trans->type, trans->packages)) != NULL) {
+ lp = checkdeps(db, trans->type, trans->packages);
+ if(lp != NULL) {
if(trans->flags & PM_TRANS_FLAG_CASCADE) {
while(lp) {
PMList *j;
@@ -101,6 +102,8 @@ int remove_prepare(pmtrans_t *trans, pmdb_t *db, PMList **data)
} else {
if(data) {
*data = lp;
+ } else {
+ FREELIST(lp);
}
RET_ERR(PM_ERR_UNSATISFIED_DEPS, -1);
}