mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-03-25 10:39:32 +08:00
@@ -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