summaryrefslogtreecommitdiff
path: root/nuttx/fs/fs_opendir.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-05 20:54:00 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-05 20:54:00 +0000
commit16be59858afa332cc8a0f8e61a215e1deea5e897 (patch)
tree0159742e27848cfac6eec8d9d87bd6579af48c18 /nuttx/fs/fs_opendir.c
parent3607bf2b4b1f2087cfb52ab4591f2ac347698a9c (diff)
downloadpx4-nuttx-16be59858afa332cc8a0f8e61a215e1deea5e897.tar.gz
px4-nuttx-16be59858afa332cc8a0f8e61a215e1deea5e897.tar.bz2
px4-nuttx-16be59858afa332cc8a0f8e61a215e1deea5e897.zip
Clean kernel-/user-mode module build
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3469 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/fs_opendir.c')
-rw-r--r--nuttx/fs/fs_opendir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nuttx/fs/fs_opendir.c b/nuttx/fs/fs_opendir.c
index 0b164734b..b0aae94f6 100644
--- a/nuttx/fs/fs_opendir.c
+++ b/nuttx/fs/fs_opendir.c
@@ -39,13 +39,13 @@
#include <nuttx/config.h>
-#include <stdlib.h>
#include <stdbool.h>
#include <dirent.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
+#include <nuttx/kmalloc.h>
#include <nuttx/fs.h>
#include <nuttx/dirent.h>
@@ -235,7 +235,7 @@ FAR DIR *opendir(FAR const char *path)
* container.
*/
- dir = (FAR struct fs_dirent_s *)zalloc(sizeof(struct fs_dirent_s));
+ dir = (FAR struct fs_dirent_s *)kzalloc(sizeof(struct fs_dirent_s));
if (!dir)
{
/* Insufficient memory to complete the operation.*/
@@ -306,7 +306,7 @@ FAR DIR *opendir(FAR const char *path)
/* Nasty goto's make error handling simpler */
errout_with_direntry:
- free(dir);
+ kfree(dir);
errout_with_semaphore:
inode_semgive();