diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-03-19 14:23:30 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-03-19 14:23:30 +0000 |
commit | e3191e3a5cd235a6ed0cab05960553e62ee036ac (patch) | |
tree | 5118f4abe01509f4c0fa4638996a6d93491153ef /nuttx/fs | |
parent | bf14d0a7cfb1c59f692cd24d9e97699b01e103b4 (diff) | |
download | px4-nuttx-e3191e3a5cd235a6ed0cab05960553e62ee036ac.tar.gz px4-nuttx-e3191e3a5cd235a6ed0cab05960553e62ee036ac.tar.bz2 px4-nuttx-e3191e3a5cd235a6ed0cab05960553e62ee036ac.zip |
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
Diffstat (limited to 'nuttx/fs')
-rw-r--r-- | nuttx/fs/fs_registerinode.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/nuttx/fs/fs_registerinode.c b/nuttx/fs/fs_registerinode.c index 395959422..a2d7892e4 100644 --- a/nuttx/fs/fs_registerinode.c +++ b/nuttx/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; |