Skip to content

Commit 0ca8526

Browse files
[pml/ubcl] Removed bad assert: a PML should suport add_proc on a NULL proc pointer
Signed-off-by: Brelle Emmanuel <emmanuel.brelle@eviden.com>
1 parent e773f54 commit 0ca8526

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

ompi/mca/pml/ubcl/pml_ubcl_endpoint.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,10 +375,18 @@ int mca_pml_ubcl_endpoint_release(ompi_proc_t *proc)
375375
ubcl_error_t ret = UBCL_SUCCESS;
376376
int ompi_error = OMPI_SUCCESS;
377377
mca_common_ubcl_endpoint_t *endpoint = NULL;
378-
assert(NULL != proc);
378+
379+
if (NULL == proc) {
380+
OPAL_OUTPUT_VERBOSE((90, mca_pml_ubcl_component.output, "pml_ubcl_endpoint release : proc is NULL"));
381+
return OMPI_SUCCESS;
382+
}
379383

380384
endpoint = (proc)->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_PML];
381-
assert(NULL != endpoint);
385+
386+
if (NULL == endpoint) {
387+
OPAL_OUTPUT_VERBOSE((50, mca_pml_ubcl_component.output, "pml_ubcl_endpoint release : endpoint is NULL"));
388+
return OMPI_SUCCESS;
389+
}
382390

383391
endpoint_refcount = opal_atomic_sub_fetch_32(&endpoint->refcount, 1);
384392
if (0 == endpoint_refcount) {

0 commit comments

Comments
 (0)