summaryrefslogtreecommitdiff
path: root/nuttx/fs/fs_fdopen.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/fs/fs_fdopen.c')
-rw-r--r--nuttx/fs/fs_fdopen.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nuttx/fs/fs_fdopen.c b/nuttx/fs/fs_fdopen.c
index 629083c77..d8a370482 100644
--- a/nuttx/fs/fs_fdopen.c
+++ b/nuttx/fs/fs_fdopen.c
@@ -144,6 +144,7 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR _TCB *tcb)
{
tcb = sched_self();
}
+ DEBUGASSERT(tcb && tcb->group);
/* Verify that this is a valid file/socket descriptor and that the
* requested access can be support.
@@ -191,9 +192,9 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR _TCB *tcb)
/* Get the stream list from the TCB */
- slist = tcb->streams;
+ slist = &tcb->group->tg_streamlist;
- /* Find an unallocated FILE structure in the stream list */
+ /* Find an unallocated FILE structure in the stream list */
ret = sem_wait(&slist->sl_sem);
if (ret != OK)