[patch 4/4] wordexp: avoid strdup and cleanup memory handling
Corinna Vinschen
vinschen@redhat.com
Wed Oct 10 16:15:00 GMT 2012
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
More information about the Newlib
mailing list