summaryrefslogtreecommitdiff
path: root/nuttx/sched/group_leave.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/sched/group_leave.c')
-rw-r--r--nuttx/sched/group_leave.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/nuttx/sched/group_leave.c b/nuttx/sched/group_leave.c
index e56952a7b..30faafa4f 100644
--- a/nuttx/sched/group_leave.c
+++ b/nuttx/sched/group_leave.c
@@ -50,6 +50,7 @@
#include "env_internal.h"
#include "pthread_internal.h"
+#include "mq_internal.h"
#include "group_internal.h"
#ifdef HAVE_TASK_GROUP
@@ -190,6 +191,12 @@ static inline void group_release(FAR struct task_group_s *group)
env_release(group);
#endif
+ /* Close message queues opened by members of the group */
+
+#ifndef CONFIG_DISABLE_MQUEUE
+ mq_release(group);
+#endif
+
#ifdef HAVE_GROUP_MEMBERS
/* Remove the group from the list of groups */