diff options
| author | shaojinchun <[email protected]> | 2018-12-10 08:33:17 +0800 |
|---|---|---|
| committer | shaojinchun <[email protected]> | 2018-12-10 08:33:17 +0800 |
| commit | 56c0df1e58a231750ebfbc93401a4b6f42f99ffb (patch) | |
| tree | 461df2f560ef9e8bedc9bd6314a1ebb30b6130f8 /components | |
| parent | 538923d34ea9a36f8b967467c60f36c02abaf387 (diff) | |
修正dfs在fd_get时,未检查有效性的问题
Diffstat (limited to 'components')
| -rw-r--r-- | components/dfs/src/dfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/dfs/src/dfs.c b/components/dfs/src/dfs.c index 38a1813421..cf0b2b0ef9 100644 --- a/components/dfs/src/dfs.c +++ b/components/dfs/src/dfs.c @@ -221,7 +221,7 @@ struct dfs_fd *fd_get(int fd) d = fdt->fds[fd]; /* check dfs_fd valid or not */ - if (d->magic != DFS_FD_MAGIC) + if ((d == NULL) || (d->magic != DFS_FD_MAGIC)) { dfs_unlock(); return NULL; |
