From cb18a0ad717abb0fb73120f4180747449406cc37 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 16 Mar 2002 04:02:03 +0000 Subject: [PATCH] (_IO_new_fdopen): Call _IO_setb to deallocate buffers if _IO_file_attach failed. --- libio/iofdopen.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libio/iofdopen.c b/libio/iofdopen.c index 91e68fa56b3..fb5838222c4 100644 --- a/libio/iofdopen.c +++ b/libio/iofdopen.c @@ -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; -- 2.47.2