diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-04-16 19:06:01 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-04-16 19:06:01 +0000 |
commit | f34c85c8db422b7808092990a2a7dbe4d147f22f (patch) | |
tree | 5d43b27fe0624ba59124d0423deded5f0ce3757a | |
parent | fe75f41d803b170f7909829cd8a2eaefb7817ecc (diff) |
2007-04-16 Joel Sherrill <joel@OARcorp.com>
PR 1240/filesystem
* src/imfs/imfs_rmnod.c: Fix link when removing a symlink. Memory for
filename was not being freed.
-rw-r--r-- | cpukit/libfs/ChangeLog | 6 | ||||
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_rmnod.c | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/cpukit/libfs/ChangeLog b/cpukit/libfs/ChangeLog index cc51f4391e..505bf88c0e 100644 --- a/cpukit/libfs/ChangeLog +++ b/cpukit/libfs/ChangeLog @@ -1,3 +1,9 @@ +2007-04-16 Joel Sherrill <joel@OARcorp.com> + + PR 1240/filesystem + * src/imfs/imfs_rmnod.c: Fix link when removing a symlink. Memory for + filename was not being freed. + 2007-03-12 Joel Sherrill <joel@OARcorp.com> * src/dosfs/msdos_misc.c: Correct license URL and/or fix mistake in diff --git a/cpukit/libfs/src/imfs/imfs_rmnod.c b/cpukit/libfs/src/imfs/imfs_rmnod.c index ae3f0dbfec..be2ca6523c 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 ); } |