Changeset 5441193 in rtems


Ignore:
Timestamp:
Jun 10, 2003, 5:32:00 PM (16 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
87a95526
Parents:
79ce8b2
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:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libfs/ChangeLog

    r79ce8b2 r5441193  
     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/Makefile.am

    r79ce8b2 r5441193  
    1212    imfs_handlers_directory.c imfs_handlers_link.c imfs_handlers_memfile.c \
    1313    imfs_debug.c imfs_rmnod.c imfs_symlink.c imfs_readlink.c imfs_fdatasync.c \
    14     imfs_fcntl.c ioman.c miniimfs_init.c imfs_load_tar.c
     14    imfs_fcntl.c ioman.c miniimfs_init.c
     15
     16# imfs_load_tar.c
    1517
    1618UNIX_C_FILES = imfs_unixstub.c
  • cpukit/libfs/src/imfs/imfs_unlink.c

    r79ce8b2 r5441193  
    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.