4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-18 20:39:33 +08:00

* libc/posix/wordexp.c (wordexp): Don't leak file streams.

This commit is contained in:
Corinna Vinschen 2012-10-09 09:09:20 +00:00
parent 992d53f5fd
commit ca8170a6c3
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2012-10-09 Peter Rosin <peda@lysator.liu.se>
* libc/posix/wordexp.c (wordexp): Don't leak file streams.
2012-10-03 DJ Delorie <dj@redhat.com>
* libc/machine/rl78/setjmp.S: Convert from CPP macros to GAS

View File

@ -143,8 +143,8 @@ wordexp(const char *words, wordexp_t *pwordexp, int flags)
pwordexp->we_wordv[pwordexp->we_wordc + offs + i] = NULL;
pwordexp->we_wordc += num_words;
close(fd[0]);
close(fd_err[0]);
fclose(f);
fclose(f_err);
/* Wait for child to finish. */
waitpid (pid, NULL, 0);