summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/add.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 307cf284..f80fe9f0 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -100,6 +100,9 @@ int add_loadtarget(pmdb_t *db, pmtrans_t *trans, char *name)
_alpm_log(PM_LOG_WARNING, "replacing older version of %s in target list", pkg->name);
FREEPKG(j->data);
j->data = info;
+ } else {
+ pm_errno = PM_ERR_TRANS_DUP_TARGET;
+ goto error;
}
}
}