Reference count field was not being initialized

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@90 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2007-03-19 14:23:30 +00:00
parent 50dcba1464
commit 05dcf3642b

View File

@ -90,11 +90,9 @@ static FAR struct inode *inode_alloc(const char *name,
mode_t mode, void *private) mode_t mode, void *private)
{ {
int namelen = inode_namelen(name); int namelen = inode_namelen(name);
FAR struct inode *node = (FAR struct inode*)malloc(FSNODE_SIZE(namelen)); FAR struct inode *node = (FAR struct inode*)zalloc(FSNODE_SIZE(namelen));
if (node) if (node)
{ {
node->i_peer = NULL;
node->i_child = NULL;
node->i_ops = fops; node->i_ops = fops;
#ifdef CONFIG_FILE_MODE #ifdef CONFIG_FILE_MODE
node->i_mode = mode; node->i_mode = mode;