[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
memory leak in imfs?
- Date: Sun, 15 Apr 2007 22:08:50 +0800
- From: neversetsun at ustc.edu (shizheng)
- Subject: memory leak in imfs?
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