projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix invalid memory access in pclose
[musl]
/
src
/
stdio
/
pclose.c
diff --git
a/src/stdio/pclose.c
b/src/stdio/pclose.c
index
c2fe7a2
..
7c77796
100644
(file)
--- a/
src/stdio/pclose.c
+++ b/
src/stdio/pclose.c
@@
-3,8
+3,9
@@
int pclose(FILE *f)
{
int status;
+ pid_t pid = f->pipe_pid;
fclose(f);
- while (waitpid(
f->pipe_
pid, &status, 0) == -1)
+ while (waitpid(pid, &status, 0) == -1)
if (errno != EINTR) return -1;
return status;
}