summaryrefslogtreecommitdiff
path: root/components/dfs
diff options
context:
space:
mode:
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;
}