[PATCH] RFS: Fix resource leak

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Oct 21 07:56:23 UTC 2015


Close #2433.
---
 cpukit/libfs/src/rfs/rtems-rfs-rtems.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/cpukit/libfs/src/rfs/rtems-rfs-rtems.c b/cpukit/libfs/src/rfs/rtems-rfs-rtems.c
index 999dfb3..a0ade04 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-rtems.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-rtems.c
@@ -831,6 +831,8 @@ rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t* mt_entry,
   rc = rtems_rfs_fs_open (mt_entry->dev, rtems, flags, max_held_buffers, &fs);
   if (rc)
   {
+    rtems_rfs_mutex_unlock (&rtems->access);
+    rtems_rfs_mutex_destroy (&rtems->access);
     free (rtems);
     return rtems_rfs_rtems_error ("initialise: open", errno);
   }
-- 
1.8.4.5



More information about the devel mailing list