projects
/
platform
/
upstream
/
rpm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12ad8a5
)
Avoid alloca() in rpmInstall()
author
Panu Matilainen
<pmatilai@redhat.com>
Fri, 25 Apr 2008 10:54:59 +0000
(13:54 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Fri, 25 Apr 2008 12:29:12 +0000
(15:29 +0300)
lib/rpminstall.c
patch
|
blob
|
history
diff --git
a/lib/rpminstall.c
b/lib/rpminstall.c
index
2b1196a
..
652dcd2
100644
(file)
--- 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);