aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdio/fclose.c
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2004-01-19 21:30:34 +0000
committerJeff Johnston <jjohnstn@redhat.com>2004-01-19 21:30:34 +0000
commit403f752cb26c161ca80bdab4981640316f67ed39 (patch)
tree5335093d25bf26b49554450e3e686db150664e34 /newlib/libc/stdio/fclose.c
parent14aecf24eb84343582bb4fe42b20b32f63c7edaa (diff)
downloadnewlib-403f752cb26c161ca80bdab4981640316f67ed39.zip
newlib-403f752cb26c161ca80bdab4981640316f67ed39.tar.gz
newlib-403f752cb26c161ca80bdab4981640316f67ed39.tar.bz2
2004-01-19 Thomas Pfaff <tpfaff@gmx.net>
* libc/stdio/fclose.c (fclose): Release FILE as the last step. * libc/stdio/freopen.c (freopen): Ditto.
Diffstat (limited to 'newlib/libc/stdio/fclose.c')
-rw-r--r--newlib/libc/stdio/fclose.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/stdio/fclose.c b/newlib/libc/stdio/fclose.c
index 630cd41..1caeb4c 100644
--- a/newlib/libc/stdio/fclose.c
+++ b/newlib/libc/stdio/fclose.c
@@ -83,11 +83,11 @@ _DEFUN (fclose, (fp),
FREEUB (fp);
if (HASLB (fp))
FREELB (fp);
- fp->_flags = 0; /* release this FILE for reuse */
_funlockfile(fp);
#ifndef __SINGLE_THREAD__
__lock_close_recursive (*(_LOCK_RECURSIVE_T *)&fp->_lock);
#endif
+ fp->_flags = 0; /* release this FILE for reuse */
return (r);
}