1
1

opal/datatype: reset ptypes in opal_datatype_clone()

Reset ptypes when cloning a datatype in order to prevent
a double free() in the opal_datatype_t destructor.

This fixes a bug introduced in open-mpi/ompi@7c938f070f

Fixes open-mpi/ompi#6346

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Этот коммит содержится в:
Gilles Gouaillardet 2019-02-01 11:20:13 +09:00
родитель 2cf6944e70
Коммит b395342c9f

Просмотреть файл

@ -12,6 +12,8 @@
* All rights reserved.
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
* Copyright (c) 2019 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -41,6 +43,7 @@ int32_t opal_datatype_clone( const opal_datatype_t * src_type, opal_datatype_t *
sizeof(opal_datatype_t)-sizeof(opal_object_t) );
dest_type->flags &= (~OPAL_DATATYPE_FLAG_PREDEFINED);
dest_type->ptypes = NULL;
dest_type->desc.desc = temp;
/**