From 403f752cb26c161ca80bdab4981640316f67ed39 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Mon, 19 Jan 2004 21:30:34 +0000 Subject: 2004-01-19 Thomas Pfaff * libc/stdio/fclose.c (fclose): Release FILE as the last step. * libc/stdio/freopen.c (freopen): Ditto. --- newlib/libc/stdio/freopen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'newlib/libc/stdio/freopen.c') diff --git a/newlib/libc/stdio/freopen.c b/newlib/libc/stdio/freopen.c index 6d54789da..ba83dd215 100644 --- a/newlib/libc/stdio/freopen.c +++ b/newlib/libc/stdio/freopen.c @@ -148,12 +148,12 @@ _DEFUN (_freopen_r, (ptr, file, mode, fp), if (f < 0) { /* did not get it after all */ - fp->_flags = 0; /* set it free */ ptr->_errno = e; /* restore in case _close clobbered */ _funlockfile(fp); #ifndef __SINGLE_THREAD__ __lock_close_recursive (*(_LOCK_RECURSIVE_T *)&fp->_lock); #endif + fp->_flags = 0; /* set it free */ return NULL; } -- cgit v1.2.3