mirror of
git://sourceware.org/git/glibc.git
synced 2025-02-23 13:09:58 +08:00
(_IO_new_proc_open): Close pipes in case the mode is invalid.
This commit is contained in:
parent
7c3c5620b4
commit
c4693424e2
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1993, 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1993, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
This file is part of the GNU IO Library.
|
||||
Written by Per Bothner <bothner@cygnus.com>.
|
||||
|
||||
@ -132,6 +132,8 @@ _IO_new_proc_open (fp, command, mode)
|
||||
}
|
||||
else
|
||||
{
|
||||
_IO_close (pipe_fds[0]);
|
||||
_IO_close (pipe_fds[1]);
|
||||
__set_errno (EINVAL);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user