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:
2c12725
)
Avoid alloca() in legacyRetrofit()
author
Panu Matilainen
<pmatilai@redhat.com>
Tue, 29 Apr 2008 07:40:56 +0000
(10:40 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Tue, 29 Apr 2008 07:40:56 +0000
(10:40 +0300)
lib/legacy.c
patch
|
blob
|
history
diff --git
a/lib/legacy.c
b/lib/legacy.c
index
3e6d4d1
..
ae6d7e0
100644
(file)
--- a/
lib/legacy.c
+++ b/
lib/legacy.c
@@
-234,9
+234,10
@@
void legacyRetrofit(Header h)
*/
if (headerGetEntry(h, RPMTAG_DEFAULTPREFIX, NULL, (rpm_data_t *) &prefix, NULL))
{
- c
onst char * nprefix = stripTrailingChar(alloca_
strdup(prefix), '/');
+ c
har * nprefix = stripTrailingChar(x
strdup(prefix), '/');
(void) headerAddEntry(h, RPMTAG_PREFIXES, RPM_STRING_ARRAY_TYPE,
&nprefix, 1);
+ free(nprefix);
}
/*