We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ea40d48 + 7c938f0 commit 29915fcCopy full SHA for 29915fc
opal/datatype/opal_datatype_create.c
@@ -11,6 +11,8 @@
11
* Copyright (c) 2004-2006 The Regents of the University of California.
12
* All rights reserved.
13
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
14
+ * Copyright (c) 2019 Research Organization for Information Science
15
+ * and Technology (RIST). All rights reserved.
16
* $COPYRIGHT$
17
*
18
* Additional copyrights may follow
@@ -77,7 +79,7 @@ static void opal_datatype_destruct( opal_datatype_t* datatype )
77
79
}
78
80
81
/* dont free the ptypes of predefined types (it was not dynamically allocated) */
- if( (NULL != datatype->ptypes) && (datatype->id >= OPAL_DATATYPE_MAX_PREDEFINED) ) {
82
+ if( (NULL != datatype->ptypes) && (!opal_datatype_is_predefined(datatype)) ) {
83
free(datatype->ptypes);
84
datatype->ptypes = NULL;
85
0 commit comments