]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(_IO_new_proc_open): Close pipes in case the mode is invalid.
authorUlrich Drepper <drepper@redhat.com>
Wed, 12 Apr 2000 20:47:08 +0000 (20:47 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 12 Apr 2000 20:47:08 +0000 (20:47 +0000)
libio/iopopen.c

index 6b2d7f5328d99b68587af73f4b509ab5b3d58cd4..cc99ba934d490c1437b4a0c6854ed9c5a71bc7d0 100644 (file)
@@ -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;
     }