mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-10-27 02:40:00 +08:00
1 file changed
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user