diff options
| author | Bernard Xiong <[email protected]> | 2015-09-20 14:51:22 +0800 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2015-09-20 14:51:22 +0800 |
| commit | 72f79d8eef64ebec31722511e8a8c34cf0085b6d (patch) | |
| tree | eb8098fa092c76dfae0b06fd221e89363a440db6 /components/dfs | |
| parent | 9ad05db536b9f178e0142664a30da3477fd15a4d (diff) | |
| parent | 7dfac0f78e546842b276806538a36066d61bd974 (diff) | |
Merge branch 'master' of https://github.com/RT-Thread/rt-thread
Diffstat (limited to 'components/dfs')
| -rw-r--r-- | components/dfs/src/dfs_posix.c | 4 |
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; } |
