File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -280,7 +280,8 @@ int ompi_mpi_errcode_finalize (void)
280280 * we have to free.
281281 */
282282 errc = (ompi_mpi_errcode_t * )opal_pointer_array_get_item (& ompi_mpi_errcodes , i );
283- OBJ_RELEASE (errc );
283+ if (NULL != errc )
284+ OBJ_RELEASE (errc );
284285 }
285286
286287 OBJ_DESTRUCT (& ompi_success );
@@ -448,6 +449,11 @@ int ompi_mpi_errcode_remove(int errnum)
448449
449450 opal_mutex_unlock (& errcode_lock );
450451
452+ /* Release the object on success */
453+ if (ret >= 0 ) {
454+ OBJ_RELEASE (errcodep );
455+ }
456+
451457 /*
452458 * Return lastused value captured under lock so caller has
453459 * consistent value to set MPI_LASTUSEDCODE attribute.
@@ -487,6 +493,11 @@ int ompi_mpi_errclass_remove(int errclass)
487493
488494 opal_mutex_unlock (& errcode_lock );
489495
496+ /* Release the object on success */
497+ if (ret >= 0 ) {
498+ OBJ_RELEASE (errcodep );
499+ }
500+
490501 /*
491502 * Return lastused value captured under lock so caller has
492503 * consistent value to set MPI_LASTUSEDCODE attribute.
You can’t perform that action at this time.
0 commit comments