diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-02-23 17:57:27 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-03-13 12:24:15 +0100 |
commit | 1bdff036acddbbc63aa849741abba6581549f7b6 (patch) | |
tree | 8cc1f06ac93045d8a7c35da41fd926c2d9e840f1 /cpukit/libfs/src/imfs/imfs_eval.c | |
parent | 2e0ce55bf04861e9f80bf51621286b9a1a2c5af1 (diff) |
IMFS: Reference counting for nodes
The introduction of reference counting of nodes avoids the removal of
open nodes and potential usage of freed memory.
Diffstat (limited to 'cpukit/libfs/src/imfs/imfs_eval.c')
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_eval.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cpukit/libfs/src/imfs/imfs_eval.c b/cpukit/libfs/src/imfs/imfs_eval.c index 33e7e36520..5b1ccfb989 100644 --- a/cpukit/libfs/src/imfs/imfs_eval.c +++ b/cpukit/libfs/src/imfs/imfs_eval.c @@ -154,6 +154,8 @@ static rtems_filesystem_eval_path_generic_status IMFS_eval_token( IMFS_is_mount_point( entry ); if ( fs_root_ptr == NULL ) { + --dir->reference_count; + ++entry->reference_count; currentloc->node_access = entry; IMFS_Set_handlers( currentloc ); |