summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rpmal.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/rpmal.c b/lib/rpmal.c
index fe0b36739..7496b44a0 100644
--- a/lib/rpmal.c
+++ b/lib/rpmal.c
@@ -402,7 +402,11 @@ rpmte * rpmalAllSatisfiesDepend(const rpmal al, const rpmds ds)
found++;
}
}
- ret[found] = NULL;
+
+ if (found)
+ ret[found] = NULL;
+ else
+ ret = _free(ret);
return ret;
}