Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libalpm/deps.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index 504ffd3e..5adb9d60 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -212,8 +212,10 @@ PMList *checkdeps(pmdb_t *db, unsigned char op, PMList *packages)
STRNCPY(miss->target, p->name, PKG_NAME_LEN);
STRNCPY(miss->depend.name, depend.name, PKG_NAME_LEN);
STRNCPY(miss->depend.version, depend.version, PKG_VERSION_LEN);
- if(!pm_list_is_ptrin(baddeps, miss)) {
+ if(!pm_list_is_ptrin(miss, baddeps)) {
baddeps = pm_list_add(baddeps, miss);
+ } else {
+ FREE(miss);
}
}
FREEPKG(p);
@@ -240,8 +242,10 @@ PMList *checkdeps(pmdb_t *db, unsigned char op, PMList *packages)
miss->depend.version[0] = '\0';
STRNCPY(miss->target, tp->name, PKG_NAME_LEN);
STRNCPY(miss->depend.name, dp->name, PKG_NAME_LEN);
- if(!pm_list_is_ptrin(baddeps, miss)) {
+ if(!pm_list_is_ptrin(miss, baddeps)) {
baddeps = pm_list_add(baddeps, miss);
+ } else {
+ FREE(miss);
}
}
}
@@ -255,8 +259,10 @@ PMList *checkdeps(pmdb_t *db, unsigned char op, PMList *packages)
miss->depend.version[0] = '\0';
STRNCPY(miss->target, tp->name, PKG_NAME_LEN);
STRNCPY(miss->depend.name, a->name, PKG_NAME_LEN);
- if(!pm_list_is_ptrin(baddeps, miss)) {
+ if(!pm_list_is_ptrin(miss, baddeps)) {
baddeps = pm_list_add(baddeps, miss);
+ } else {
+ FREE(miss);
}
}
}
@@ -272,8 +278,10 @@ PMList *checkdeps(pmdb_t *db, unsigned char op, PMList *packages)
miss->depend.version[0] = '\0';
STRNCPY(miss->target, tp->name, PKG_NAME_LEN);
STRNCPY(miss->depend.name, info->name, PKG_NAME_LEN);
- if(!pm_list_is_ptrin(baddeps, miss)) {
+ if(!pm_list_is_ptrin(miss, baddeps)) {
baddeps = pm_list_add(baddeps, miss);
+ } else {
+ FREE(miss);
}
}
}
@@ -411,8 +419,10 @@ PMList *checkdeps(pmdb_t *db, unsigned char op, PMList *packages)
STRNCPY(miss->target, tp->name, PKG_NAME_LEN);
STRNCPY(miss->depend.name, depend.name, PKG_NAME_LEN);
STRNCPY(miss->depend.version, depend.version, PKG_VERSION_LEN);
- if(!pm_list_is_ptrin(baddeps, miss)) {
+ if(!pm_list_is_ptrin(miss, baddeps)) {
baddeps = pm_list_add(baddeps, miss);
+ } else {
+ FREE(miss);
}
}
}
@@ -433,8 +443,10 @@ PMList *checkdeps(pmdb_t *db, unsigned char op, PMList *packages)
miss->depend.version[0] = '\0';
STRNCPY(miss->target, tp->name, PKG_NAME_LEN);
STRNCPY(miss->depend.name, (char *)j->data, PKG_NAME_LEN);
- if(!pm_list_is_ptrin(baddeps, miss)) {
+ if(!pm_list_is_ptrin(miss, baddeps)) {
baddeps = pm_list_add(baddeps, miss);
+ } else {
+ FREE(miss);
}
}
}