projects
/
tools
/
librpm-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39dcd57
)
Remove alloca() ussage from rpmcache.c
author
Jindrich Novy
<jnovy@redhat.com>
Mon, 28 Apr 2008 10:50:24 +0000
(12:50 +0200)
committer
Jindrich Novy
<jnovy@redhat.com>
Mon, 28 Apr 2008 10:50:24 +0000
(12:50 +0200)
tools/rpmcache.c
patch
|
blob
|
history
diff --git
a/tools/rpmcache.c
b/tools/rpmcache.c
index
fd25b83
..
9564bfa
100644
(file)
--- a/
tools/rpmcache.c
+++ b/
tools/rpmcache.c
@@
-222,7
+222,7
@@
static int ftsStashLatest(FTSENT * fts, rpmts ts)
add = rpmdsThis(h, RPMTAG_REQUIRENAME, (RPMSENSE_EQUAL|RPMSENSE_LESS));
if (items != NULL && nitems > 0) {
- Item needle =
memset(alloca(sizeof(*needle)), 0
, sizeof(*needle));
+ Item needle =
xcalloc(1
, sizeof(*needle));
Item * found, * fneedle = &needle;
needle->this = add;
@@
-244,6
+244,7
@@
static int ftsStashLatest(FTSENT * fts, rpmts ts)
i = found - items;
break;
}
+ free(needle);
}
/*