summaryrefslogtreecommitdiff
path: root/components/dfs
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2015-09-24 17:23:00 +0800
committerBernard Xiong <[email protected]>2015-09-24 17:23:00 +0800
commit9413a61499a98cd86df0e4abb39da9f681dbdd81 (patch)
treeb794148debd7b1668a8c7fbfdf67571cb608ea25 /components/dfs
parent6a7638599ca0d23d5e40f7a36a13d8be3e47543a (diff)
parenta8dc960ba1f1bbe7758cd8db24b886d96ae2c96c (diff)
Merge branch 'master' of https://git.coding.net/RT-Thread/rt-thread
Diffstat (limited to 'components/dfs')
-rw-r--r--components/dfs/src/dfs_posix.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/components/dfs/src/dfs_posix.c b/components/dfs/src/dfs_posix.c
index 250f6eaf7f..c379d5c969 100644
--- a/components/dfs/src/dfs_posix.c
+++ b/components/dfs/src/dfs_posix.c
@@ -230,6 +230,7 @@ off_t lseek(int fd, off_t offset, int whence)
break;
default:
+ fd_put(d);
rt_set_errno(-DFS_STATUS_EINVAL);
return -1;
@@ -237,6 +238,7 @@ off_t lseek(int fd, off_t offset, int whence)
if (offset < 0)
{
+ fd_put(d);
rt_set_errno(-DFS_STATUS_EINVAL);
return -1;
@@ -458,6 +460,7 @@ int mkdir(const char *path, mode_t mode)
if (result < 0)
{
fd_put(d);
+ fd_put(d);
rt_set_errno(result);
return -1;
@@ -465,6 +468,7 @@ int mkdir(const char *path, mode_t mode)
dfs_file_close(d);
fd_put(d);
+ fd_put(d);
return 0;
}