diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 062bbf1589..539e143152 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,9 @@ +2007-04-16 Joel Sherrill + + PR 1240/filesystem + * libfs/src/imfs/imfs_rmnod.c: Fix link when removing a symlink. Memory + for filename was not being freed. + 2007-04-12 Joel Sherrill * itron/src/rsm_tsk.c: Correct error returned. diff --git a/cpukit/libfs/src/imfs/imfs_rmnod.c b/cpukit/libfs/src/imfs/imfs_rmnod.c index d5e32378ad..f37cb6d23c 100644 --- a/cpukit/libfs/src/imfs/imfs_rmnod.c +++ b/cpukit/libfs/src/imfs/imfs_rmnod.c @@ -71,6 +71,10 @@ int IMFS_rmnod( * Free memory associated with a memory file. */ + if ( the_jnode->type == IMFS_SYM_LINK ) { + if ( the_jnode->info.sym_link.name ) + free( the_jnode->info.sym_link.name ); + } free( the_jnode ); }