summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/fdatasync.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libcsupport/src/fdatasync.c')
-rw-r--r--cpukit/libcsupport/src/fdatasync.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpukit/libcsupport/src/fdatasync.c b/cpukit/libcsupport/src/fdatasync.c
index 14e66726e6..bf90957f0f 100644
--- a/cpukit/libcsupport/src/fdatasync.c
+++ b/cpukit/libcsupport/src/fdatasync.c
@@ -28,6 +28,7 @@ int fdatasync(
)
{
rtems_libio_t *iop;
+ int rv;
LIBIO_GET_IOP_WITH_ACCESS( fd, iop, LIBIO_FLAGS_WRITE, EBADF );
@@ -35,5 +36,7 @@ int fdatasync(
* Now process the fdatasync().
*/
- return (*iop->pathinfo.handlers->fdatasync_h)( iop );
+ rv = (*iop->pathinfo.handlers->fdatasync_h)( iop );
+ rtems_libio_iop_drop( iop );
+ return rv;
}