Changeset e8ee0717 in rtems


Ignore:
Timestamp:
Jun 10, 2003, 5:32:04 PM (17 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Children:
040e70a0
Parents:
a699864a
Message:

2003-06-10 Phil Torre <ptorre@…>

PR 411/filesystem

  • src/imfs/imfs_unlink.c: Fix bug where renaming a memfile and then unlinking it causes a memory leak.
Location:
cpukit/libfs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libfs/ChangeLog

    ra699864a re8ee0717  
     12003-06-10      Phil Torre <ptorre@zetron.com>
     2
     3        PR 411/filesystem
     4        * src/imfs/imfs_unlink.c: Fix bug where renaming a memfile and
     5        then unlinking it causes a memory leak.
     6
    172003-03-25      Thomas Doerfler <Thomas.Doerfler@imd-systems.de>
    28
  • cpukit/libfs/src/imfs/imfs_unlink.c

    ra699864a re8ee0717  
    5959     */
    6060
    61     node->info.hard_link.link_node->st_nlink --;
    62     IMFS_update_ctime( node->info.hard_link.link_node );
    63     if ( node->info.hard_link.link_node->st_nlink < 1) {
    64       result = (*the_link.handlers->rmnod_h)( &the_link );
    65       if ( result != 0 )
    66         return -1;
     61    if ( node->info.hard_link.link_node->st_nlink == 1)
     62    {
     63        result = (*the_link.handlers->rmnod_h)( &the_link );
     64        if ( result != 0 )
     65            return -1;
     66    }
     67    else
     68    {
     69        node->info.hard_link.link_node->st_nlink --;
     70        IMFS_update_ctime( node->info.hard_link.link_node );
    6771    }
    6872  }
Note: See TracChangeset for help on using the changeset viewer.