summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/legacy.c3
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);
}
/*