From bfb140cc7b0d7e4f6bc55ef1946af19fd273f99a Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 29 Nov 2006 22:24:07 +0000 Subject: (Trans_add) factorize size to allocate --- URPM.xs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/URPM.xs b/URPM.xs index f4fb646..3edee4e 100644 --- a/URPM.xs +++ b/URPM.xs @@ -2692,7 +2692,7 @@ Trans_add(trans, pkg, ...) #ifdef RPM_446 relocations = calloc(j + 1, sizeof(*relocations)); #else - relocations = calloc(2 + av_len(excludepath), sizeof(rpmRelocation)); + relocations = calloc(j + 1, sizeof(rpmRelocation)); #endif while (--j >= 0) { SV **e = av_fetch(excludepath, j, 0); -- cgit v1.2.1