This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [patch 4/4] wordexp: avoid strdup and cleanup memory handling
Hi Peter,
On Oct 9 10:06, Peter Rosin wrote:
> [...]
> @@ -142,11 +148,14 @@ wordexp(const char *words, wordexp_t *pw
>
> num_words = atoi(tmp);
>
> - wordv = (char **)realloc(pwordexp->we_wordv,
> - (pwordexp->we_wordc + num_words + offs + 1) * sizeof(char *));
> + if (pwordexp->we_wordv)
> + wordv = we_wordv_to_ext_wordv(pwordexp->we_wordv);
^^^^^^^^^^^^^^^^^^^^^
This is supposed to be uppercase, right?
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat