summaryrefslogtreecommitdiff
path: root/nuttx/sched
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/sched')
-rw-r--r--nuttx/sched/group_create.c4
-rw-r--r--nuttx/sched/group_setupidlefiles.c4
-rw-r--r--nuttx/sched/os_start.c11
3 files changed, 12 insertions, 7 deletions
diff --git a/nuttx/sched/group_create.c b/nuttx/sched/group_create.c
index d18fb82f8..875c36d10 100644
--- a/nuttx/sched/group_create.c
+++ b/nuttx/sched/group_create.c
@@ -225,6 +225,10 @@ int group_allocate(FAR struct task_tcb_s *tcb)
ret = env_dup(group);
if (ret < 0)
{
+#if CONFIG_NFILE_STREAMS > 0 && defined(CONFIG_NUTTX_KERNEL) && \
+ defined(CONFIG_MM_KERNEL_HEAP)
+ kufree(group->tg_streamlist);
+#endif
kfree(group);
tcb->cmn.group = NULL;
return ret;
diff --git a/nuttx/sched/group_setupidlefiles.c b/nuttx/sched/group_setupidlefiles.c
index 25ed71c04..2589dc637 100644
--- a/nuttx/sched/group_setupidlefiles.c
+++ b/nuttx/sched/group_setupidlefiles.c
@@ -80,14 +80,14 @@
int group_setupidlefiles(FAR struct task_tcb_s *tcb)
{
-#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0
+#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0
FAR struct task_group_s *group = tcb->cmn.group;
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_DEV_CONSOLE)
int fd;
#endif
-#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0
+#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0
DEBUGASSERT(group);
#endif
diff --git a/nuttx/sched/os_start.c b/nuttx/sched/os_start.c
index 6894ddc1b..fbb3b7743 100644
--- a/nuttx/sched/os_start.c
+++ b/nuttx/sched/os_start.c
@@ -39,8 +39,9 @@
#include <sys/types.h>
#include <stdbool.h>
-#include <debug.h>
#include <string.h>
+#include <assert.h>
+#include <debug.h>
#include <nuttx/arch.h>
#include <nuttx/compiler.h>
@@ -463,28 +464,28 @@ void os_start(void)
/* Allocate the IDLE group and suppress child status. */
#ifdef HAVE_TASK_GROUP
- (void)group_allocate(&g_idletcb);
+ DEBUGVERIFY(group_allocate(&g_idletcb));
#endif
/* Create stdout, stderr, stdin on the IDLE task. These will be
* inherited by all of the threads created by the IDLE task.
*/
- (void)group_setupidlefiles(&g_idletcb);
+ DEBUGVERIFY(group_setupidlefiles(&g_idletcb));
/* Complete initialization of the IDLE group. Suppress retention
* of child status in the IDLE group.
*/
#ifdef HAVE_TASK_GROUP
- (void)group_initialize(&g_idletcb);
+ DEBUGVERIFY(group_initialize(&g_idletcb));
g_idletcb.cmn.group->tg_flags = GROUP_FLAG_NOCLDWAIT;
#endif
/* Bring Up the System ****************************************************/
/* Create initial tasks and bring-up the system */
- (void)os_bringup();
+ DEBUGVERIFY(os_bringup());
/* The IDLE Loop **********************************************************/
/* When control is return to this point, the system is idle. */