memory leak in imfs?
shizheng
neversetsun at ustc.edu
Sun Apr 15 14:08:50 UTC 2007
Hi,
When a symlink file of IMFS is created, IMFS_jnode_t->info.sym_link.name
is allocated
in IMFS_create_node function. But the memory isn't freed when
IMFS_rmnod is called.
int IMFS_rmnod(
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
......
if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink <
1) ) {
......
/*
* Free memory associated with a memory file.
*/
free( the_jnode ); /* here only the_jnode is freed, how about the
memory that hold the symlink name??*/
}
return 0;
}
yours, shizheng
More information about the users
mailing list