summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/fsync.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libcsupport/src/fsync.c')
-rw-r--r--cpukit/libcsupport/src/fsync.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpukit/libcsupport/src/fsync.c b/cpukit/libcsupport/src/fsync.c
index 6332180721..428f82abd0 100644
--- a/cpukit/libcsupport/src/fsync.c
+++ b/cpukit/libcsupport/src/fsync.c
@@ -31,6 +31,7 @@ int fsync(
)
{
rtems_libio_t *iop;
+ int rv;
LIBIO_GET_IOP( fd, iop );
@@ -38,5 +39,7 @@ int fsync(
* Now process the fsync().
*/
- return (*iop->pathinfo.handlers->fsync_h)( iop );
+ rv = (*iop->pathinfo.handlers->fsync_h)( iop );
+ rtems_libio_iop_drop( iop );
+ return rv;
}