This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [patch alt 4/4] wordexp: avoid strdup and cleanup memory handling
On 2012-09-14 19:36, Peter Rosin wrote:
> 2012-09-14 Peter Rosin <peda@lysator.liu.se>
>
> * libc/posix/wordfree.c (wordfree): The wrong words are freed
> when WRDE_DOOFFS is in use. Restructure the code so that the memory
> needed to be freed is instead kept in an internal linked list...
> * libc/posix/wordexp2.h: ...as defined here...
> * libc/posix/wordfree.c (wordfree): ...and build this internal
Should have been s/wordfree/wordexp/g on the above line.
> linked list here, avoiding wasteful strdup calls in the process.
And sorry for all the noise on the wordexp subject, I'll try to shut up now.
Cheers,
Peter