summaryrefslogtreecommitdiffstats
path: root/libc/stdio/fclose.c
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:03:48 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:03:48 -0800
commit4e468ed2eb86a2406e14f1eca82072ee501d05fd (patch)
tree4e05b3c66eef86531e464521a3bf96a1864d4bf5 /libc/stdio/fclose.c
parenta27d2baa0c1a2ec70f47ea9199b1dd6762c8a349 (diff)
downloadbionic-4e468ed2eb86a2406e14f1eca82072ee501d05fd.zip
bionic-4e468ed2eb86a2406e14f1eca82072ee501d05fd.tar.gz
bionic-4e468ed2eb86a2406e14f1eca82072ee501d05fd.tar.bz2
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'libc/stdio/fclose.c')
-rw-r--r--libc/stdio/fclose.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libc/stdio/fclose.c b/libc/stdio/fclose.c
index bdf6e52..e94292b 100644
--- a/libc/stdio/fclose.c
+++ b/libc/stdio/fclose.c
@@ -36,6 +36,9 @@
#include <stdlib.h>
#include "local.h"
+/* BIONIC: remove any file lock associated with a FILE* pointer */
+extern void __fremovelock(FILE *fp);
+
int
fclose(FILE *fp)
{
@@ -57,5 +60,6 @@ fclose(FILE *fp)
FREELB(fp);
fp->_flags = 0; /* Release this FILE for reuse. */
fp->_r = fp->_w = 0; /* Mess up if reaccessed. */
+ __fremovelock(fp);
return (r);
}