diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2012-10-09 09:09:20 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2012-10-09 09:09:20 +0000 |
commit | ca8170a6c37e017ab757eb6ab3bf1361c6420972 (patch) | |
tree | 30d4d0a79d832d4df840c537a803e71ac3f9eba9 /newlib/libc | |
parent | 992d53f5fd3aea2daabe83b3e3be96f9a21d9f96 (diff) | |
download | newlib-ca8170a6c37e017ab757eb6ab3bf1361c6420972.zip newlib-ca8170a6c37e017ab757eb6ab3bf1361c6420972.tar.gz newlib-ca8170a6c37e017ab757eb6ab3bf1361c6420972.tar.bz2 |
* libc/posix/wordexp.c (wordexp): Don't leak file streams.
Diffstat (limited to 'newlib/libc')
-rw-r--r-- | newlib/libc/posix/wordexp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/newlib/libc/posix/wordexp.c b/newlib/libc/posix/wordexp.c index bfdb63f..a5a97db 100644 --- a/newlib/libc/posix/wordexp.c +++ b/newlib/libc/posix/wordexp.c @@ -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); |