Skip to content

Commit e379d5b

Browse files
committed
pmix: Increment the reference count in PMIx_Init
The reference counting was broken which led PMIx_Finalize to release resources early. This fixes the "use after free" scenarios that I encountered. (based on commit openpmix/openpmix@abfaa4c)
1 parent e9c8d74 commit e379d5b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

opal/mca/pmix/pmix112/pmix/src/client/pmix_client.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ int PMIx_Init(pmix_proc_t *proc)
237237
(void)strncpy(proc->nspace, pmix_globals.myid.nspace, PMIX_MAX_NSLEN);
238238
proc->rank = pmix_globals.myid.rank;
239239
}
240+
++pmix_globals.init_cntr;
240241
return PMIX_SUCCESS;
241242
}
242243

0 commit comments

Comments
 (0)