Skip to content

Commit 50d8012

Browse files
committed
MPI_Info_dup: allocate info through ompi_info_allocate instead of OBJ_NEW
The call to ompi_info_allocate ensures that the ompi instance is properly retained (similar to MPI_Info_create). The instance is then released in MPI_Info_free. Thanks to Lisandro Dalcin for reporting and providing an easy reproducer. Signed-off-by: Joseph Schuchart <[email protected]>
1 parent 02d91b5 commit 50d8012

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ompi/mpi/c/info_dup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ int MPI_Info_dup(MPI_Info info, MPI_Info *newinfo) {
7575
}
7676
}
7777

78-
*newinfo = OBJ_NEW(ompi_info_t);
78+
*newinfo = ompi_info_allocate();
7979
if (NULL == *newinfo) {
8080
return OMPI_ERRHANDLER_NOHANDLE_INVOKE(MPI_ERR_NO_MEM,
8181
FUNC_NAME);

0 commit comments

Comments
 (0)