aboutsummaryrefslogtreecommitdiff
path: root/nuttx/sched/group_releasefiles.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/sched/group_releasefiles.c')
-rw-r--r--nuttx/sched/group_releasefiles.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/nuttx/sched/group_releasefiles.c b/nuttx/sched/group_releasefiles.c
index 40bf373b4..b33415c76 100644
--- a/nuttx/sched/group_releasefiles.c
+++ b/nuttx/sched/group_releasefiles.c
@@ -80,7 +80,9 @@ int group_releasefiles(_TCB *tcb)
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct task_group_s *group = tcb->group;
DEBUGASSERT(group);
+#endif
+#if CONFIG_NFILE_DESCRIPTORS > 0
/* Free resources used by the file descriptor list */
files_releaselist(&group->tg_filelist);
@@ -88,11 +90,8 @@ int group_releasefiles(_TCB *tcb)
#if CONFIG_NFILE_STREAMS > 0
/* Free the stream list */
- if (tcb->streams)
- {
- lib_releaselist(tcb->streams);
- tcb->streams = NULL;
- }
+ lib_releaselist(&group->tg_streamlist);
+
#endif /* CONFIG_NFILE_STREAMS */
#endif /* CONFIG_NFILE_DESCRIPTORS */