diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-04-25 15:37:09 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-04-25 15:37:09 +0300 |
commit | 8e4a5f88cecb6c9f577cff91317851bc94abd8e9 (patch) | |
tree | 0cd1701401bcb25f86b05223f050b41f09b4105c /lib | |
parent | 8660bd61f6bbfa20635ef74827b36864d9ec0e7b (diff) | |
download | rpm-8e4a5f88cecb6c9f577cff91317851bc94abd8e9.tar.gz rpm-8e4a5f88cecb6c9f577cff91317851bc94abd8e9.tar.bz2 rpm-8e4a5f88cecb6c9f577cff91317851bc94abd8e9.zip |
Avoid alloca() in markReplacedFiles()
Diffstat (limited to 'lib')
-rw-r--r-- | lib/psm.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -185,7 +185,7 @@ static rpmRC markReplacedFiles(const rpmpsm psm) if (num == 0) return RPMRC_OK; - offsets = alloca(num * sizeof(*offsets)); + offsets = xmalloc(num * sizeof(*offsets)); offsets[0] = 0; num = prev = 0; for (sfi = replaced; sfi->otherPkg; sfi++) { @@ -227,6 +227,7 @@ static rpmRC markReplacedFiles(const rpmpsm psm) } } mi = rpmdbFreeIterator(mi); + free(offsets); return RPMRC_OK; } |