Skip to content

Commit 16fe18e

Browse files
authored
Merge pull request #2036 from edgargabriel/pr/datatype-refcount-fix
io/ompio: fix the reference count of basic datatypes used as etypes o…
2 parents 39d086e + be183cb commit 16fe18e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

ompi/mca/common/ompio/common_ompio_file_view.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ static int datatype_duplicate (ompi_datatype_t *oldtype, ompi_datatype_t **newt
3232
{
3333
ompi_datatype_t *type;
3434
if( ompi_datatype_is_predefined(oldtype) ) {
35+
OBJ_RETAIN(oldtype);
3536
*newtype = oldtype;
3637
return OMPI_SUCCESS;
3738
}

ompi/mca/io/ompio/io_ompio_file_set_view.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ static int datatype_duplicate (ompi_datatype_t *oldtype, ompi_datatype_t **newt
3838
{
3939
ompi_datatype_t *type;
4040
if( ompi_datatype_is_predefined(oldtype) ) {
41+
OBJ_RETAIN(oldtype);
4142
*newtype = oldtype;
4243
return OMPI_SUCCESS;
4344
}

0 commit comments

Comments
 (0)