Avoid alloca() in rpmInstall()
This commit is contained in:
parent
12ad8a5194
commit
b046a85409
|
@ -210,7 +210,7 @@ struct rpmEIU {
|
||||||
/** @todo Generalize --freshen policies. */
|
/** @todo Generalize --freshen policies. */
|
||||||
int rpmInstall(rpmts ts, struct rpmInstallArguments_s * ia, ARGV_t fileArgv)
|
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;
|
rpmps ps;
|
||||||
rpmprobFilterFlags probFilter;
|
rpmprobFilterFlags probFilter;
|
||||||
rpmRelocation * relocations;
|
rpmRelocation * relocations;
|
||||||
|
@ -605,6 +605,7 @@ exit:
|
||||||
eiu->pkgState = _free(eiu->pkgState);
|
eiu->pkgState = _free(eiu->pkgState);
|
||||||
eiu->pkgURL = _free(eiu->pkgURL);
|
eiu->pkgURL = _free(eiu->pkgURL);
|
||||||
eiu->argv = _free(eiu->argv);
|
eiu->argv = _free(eiu->argv);
|
||||||
|
free(eiu);
|
||||||
|
|
||||||
rpmtsEmpty(ts);
|
rpmtsEmpty(ts);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue