summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rpminfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rpminfo.c b/rpminfo.c
index 3cc5f54..2631a3f 100644
--- a/rpminfo.c
+++ b/rpminfo.c
@@ -410,7 +410,7 @@ PHP_FUNCTION(rpmdbsearch)
RETURN_FALSE;
}
- array_init(return_value);
+ array_init_size(return_value, rpmdbGetIteratorCount(di));
while ((h = rpmdbNextIterator(di)) != NULL) {
zval tmp;
rpm_header_to_zval(&tmp, h, 0);