summaryrefslogtreecommitdiffstats
path: root/newlib/libc/stdio/freopen.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/freopen.c')
-rw-r--r--newlib/libc/stdio/freopen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/stdio/freopen.c b/newlib/libc/stdio/freopen.c
index dd42aaae1..b0372b57c 100644
--- a/newlib/libc/stdio/freopen.c
+++ b/newlib/libc/stdio/freopen.c
@@ -96,7 +96,7 @@ _DEFUN (_freopen_r, (ptr, file, mode, fp),
if ((flags = __sflags (ptr, mode, &oflags)) == 0)
{
_funlockfile(fp);
- (void) fclose (fp);
+ (void) _fclose_r (ptr, fp);
__sfp_lock_release ();
return NULL;
}