From 05dcf3642be6f2e2599374440da78316d367e8d9 Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 19 Mar 2007 14:23:30 +0000 Subject: [PATCH] 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 --- fs/fs_registerinode.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/fs_registerinode.c b/fs/fs_registerinode.c index 3959594228..a2d7892e46 100644 --- a/fs/fs_registerinode.c +++ b/fs/fs_registerinode.c @@ -90,11 +90,9 @@ static FAR struct inode *inode_alloc(const char *name, mode_t mode, void *private) { 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) { - node->i_peer = NULL; - node->i_child = NULL; node->i_ops = fops; #ifdef CONFIG_FILE_MODE node->i_mode = mode;