]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(_IO_new_fdopen): Call _IO_setb to deallocate buffers if _IO_file_attach failed.
authorUlrich Drepper <drepper@redhat.com>
Sat, 16 Mar 2002 04:02:03 +0000 (04:02 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 16 Mar 2002 04:02:03 +0000 (04:02 +0000)
libio/iofdopen.c

index 91e68fa56b3d4ed2640a17c5177d0a2d2c0f7d30..fb5838222c4ac6e6cda29e611fd90cfbb7d4c700 100644 (file)
@@ -132,6 +132,7 @@ _IO_new_fdopen (fd, mode)
 #endif
   if (_IO_file_attach ((_IO_FILE *) &new_f->fp, fd) == NULL)
     {
+      _IO_setb (&new_f->fp, NULL, NULL, 0);
       _IO_un_link (&new_f->fp);
       free (new_f);
       return NULL;