Skip to content

Commit b4e4e4a

Browse files
committed
pmix3x: enhance pmix_nspace_t destructor
PMIX_RELEASE all elements stored in the internal and modex hash tables (back-ported from upstream commit openpmix/openpmix@b90674f)
1 parent f1dc033 commit b4e4e4a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

opal/mca/pmix/pmix3x/pmix/src/include/pmix_globals.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,21 @@ static void nscon(pmix_nspace_t *p)
8585
}
8686
static void nsdes(pmix_nspace_t *p)
8787
{
88+
uint64_t key;
89+
pmix_object_t *obj;
90+
8891
PMIX_LIST_DESTRUCT(&p->nodes);
92+
PMIX_HASH_TABLE_FOREACH(key, uint64, obj, &p->internal) {
93+
if (NULL != obj) {
94+
PMIX_RELEASE(obj);
95+
}
96+
}
8997
PMIX_DESTRUCT(&p->internal);
98+
PMIX_HASH_TABLE_FOREACH(key, uint64, obj, &p->modex) {
99+
if (NULL != obj) {
100+
PMIX_RELEASE(obj);
101+
}
102+
}
90103
PMIX_DESTRUCT(&p->modex);
91104
if (NULL != p->server) {
92105
PMIX_RELEASE(p->server);

0 commit comments

Comments
 (0)