Changeset 11026956 in rtems


Ignore:
Timestamp:
Feb 6, 2015, 7:50:49 PM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
a2f5c7e1
Parents:
60cf8a5
git-author:
Sebastian Huber <sebastian.huber@…> (02/06/15 19:50:49)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/12/15 19:53:35)
Message:

IMFS: Fix resource leak

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libfs/src/imfs/imfs_link.c

    r60cf8a5 r11026956  
    120120  _Assert( target != NULL );
    121121
    122   if ( target->st_nlink == 1) {
     122  if ( target->st_nlink == 1 ) {
    123123    target = (*target->control->node_remove)( target );
    124124    if ( target == NULL ) {
     
    128128    --target->st_nlink;
    129129    IMFS_update_ctime( target );
     130  }
     131
     132  if ( target != NULL ) {
     133    --target->reference_count;
     134
     135    if ( target->reference_count == 0 ) {
     136      IMFS_node_destroy( target );
     137    }
    130138  }
    131139
Note: See TracChangeset for help on using the changeset viewer.