Avoid alloca() in rpmInstall()

This commit is contained in:
Panu Matilainen 2008-04-25 13:54:59 +03:00
parent 12ad8a5194
commit b046a85409
1 changed files with 2 additions and 1 deletions

View File

@ -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);