diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-08-22 14:49:05 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-08-22 14:49:05 -0600 |
commit | 6fa05135bf85fb38a13cd1d0460399433b780e34 (patch) | |
tree | c2742c9b8279535aedf7a0961d418f5c82334366 /nuttx/sched/group | |
parent | 2c743749420b1fd6ad9cee20de829e7b580b6bb7 (diff) | |
download | px4-nuttx-6fa05135bf85fb38a13cd1d0460399433b780e34.tar.gz px4-nuttx-6fa05135bf85fb38a13cd1d0460399433b780e34.tar.bz2 px4-nuttx-6fa05135bf85fb38a13cd1d0460399433b780e34.zip |
Need to release the addess environment when the task group is released
Diffstat (limited to 'nuttx/sched/group')
-rw-r--r-- | nuttx/sched/group/group_leave.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/nuttx/sched/group/group_leave.c b/nuttx/sched/group/group_leave.c index ec25792e7..c6f15ddf0 100644 --- a/nuttx/sched/group/group_leave.c +++ b/nuttx/sched/group/group_leave.c @@ -1,7 +1,7 @@ /***************************************************************************** * sched/group/group_leave.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013-2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -169,11 +169,11 @@ static inline void group_release(FAR struct task_group_s *group) pthread_release(group); #endif +#if CONFIG_NFILE_DESCRIPTORS > 0 /* Free all file-related resources now. We really need to close files as * soon as possible while we still have a functioning task. */ -#if CONFIG_NFILE_DESCRIPTORS > 0 /* Free resources held by the file descriptor list */ files_releaselist(&group->tg_filelist); @@ -196,18 +196,24 @@ static inline void group_release(FAR struct task_group_s *group) net_releaselist(&group->tg_socketlist); #endif /* CONFIG_NSOCKET_DESCRIPTORS */ +#ifndef CONFIG_DISABLE_ENVIRON /* Release all shared environment variables */ -#ifndef CONFIG_DISABLE_ENVIRON env_release(group); #endif +#ifndef CONFIG_DISABLE_MQUEUE /* Close message queues opened by members of the group */ -#ifndef CONFIG_DISABLE_MQUEUE mq_release(group); #endif +#ifdef CONFIG_ADDRENV + /* Destroy the group address environment */ + + (void)up_addrenv_destroy(group->addrenv); +#endif + #ifdef HAVE_GROUP_MEMBERS /* Remove the group from the list of groups */ |