diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-04-29 10:40:56 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-04-29 10:40:56 +0300 |
commit | ad9d933514a6ab5015bccf7a7022f0d2319deab7 (patch) | |
tree | 9116a599eb50f2b7c17ad200947ad9b865cb3a18 | |
parent | 2c12725620193da7078693cb893c3dab152a0dfa (diff) | |
download | rpm-ad9d933514a6ab5015bccf7a7022f0d2319deab7.tar.gz rpm-ad9d933514a6ab5015bccf7a7022f0d2319deab7.tar.bz2 rpm-ad9d933514a6ab5015bccf7a7022f0d2319deab7.zip |
Avoid alloca() in legacyRetrofit()
-rw-r--r-- | lib/legacy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/legacy.c b/lib/legacy.c index 3e6d4d197..ae6d7e03e 100644 --- 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)) { - const char * nprefix = stripTrailingChar(alloca_strdup(prefix), '/'); + char * nprefix = stripTrailingChar(xstrdup(prefix), '/'); (void) headerAddEntry(h, RPMTAG_PREFIXES, RPM_STRING_ARRAY_TYPE, &nprefix, 1); + free(nprefix); } /* |