diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-04-25 13:54:59 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-04-25 15:29:12 +0300 |
commit | b046a85409cecc5d7efdb75185fe155e0e3e4293 (patch) | |
tree | 7845050ee8690fa1d6619f8d386178487e96db52 /lib/rpminstall.c | |
parent | 12ad8a5194168cf5213dc359283a8997c5501999 (diff) | |
download | librpm-tizen-b046a85409cecc5d7efdb75185fe155e0e3e4293.tar.gz librpm-tizen-b046a85409cecc5d7efdb75185fe155e0e3e4293.tar.bz2 librpm-tizen-b046a85409cecc5d7efdb75185fe155e0e3e4293.zip |
Avoid alloca() in rpmInstall()
Diffstat (limited to 'lib/rpminstall.c')
-rw-r--r-- | lib/rpminstall.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rpminstall.c b/lib/rpminstall.c index 2b1196afe..652dcd2cb 100644 --- a/lib/rpminstall.c +++ b/lib/rpminstall.c @@ -210,7 +210,7 @@ struct rpmEIU { /** @todo Generalize --freshen policies. */ int rpmInstall(rpmts ts, struct rpmInstallArguments_s * ia, ARGV_t fileArgv) { - struct rpmEIU * eiu = memset(alloca(sizeof(*eiu)), 0, sizeof(*eiu)); + struct rpmEIU * eiu = xcalloc(1, sizeof(*eiu)); rpmps ps; rpmprobFilterFlags probFilter; rpmRelocation * relocations; @@ -605,6 +605,7 @@ exit: eiu->pkgState = _free(eiu->pkgState); eiu->pkgURL = _free(eiu->pkgURL); eiu->argv = _free(eiu->argv); + free(eiu); rpmtsEmpty(ts); |