From e22ee464765a40549e35fa754f1c4b018b5901b2 Mon Sep 17 00:00:00 2001 From: Jindrich Novy Date: Mon, 28 Apr 2008 15:42:04 +0200 Subject: [PATCH] Remove alloca() from argv.c --- rpmio/argv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpmio/argv.c b/rpmio/argv.c index ff11f5c4a..c96a7bf42 100644 --- a/rpmio/argv.c +++ b/rpmio/argv.c @@ -169,7 +169,7 @@ int argvAppend(ARGV_t * argvp, ARGV_const_t av) int argvSplit(ARGV_t * argvp, const char * str, const char * seps) { - char * dest = alloca(strlen(str) + 1); + char *dest = xmalloc(strlen(str) + 1); ARGV_t argv; int argc = 1; const char * s; @@ -195,6 +195,7 @@ int argvSplit(ARGV_t * argvp, const char * str, const char * seps) } argv[c] = NULL; *argvp = argv; + free(dest); return 0; }