1
1

free the datatypes that were created using type_dup during file_set_view

Этот коммит содержится в:
Edgar Gabriel 2015-08-07 11:50:25 -05:00
родитель 1ae4f8c7e6
Коммит 6f6c01ee8d
2 изменённых файлов: 11 добавлений и 0 удалений

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

@ -380,6 +380,14 @@ ompio_io_ompio_file_close (mca_io_ompio_file_t *ompio_fh)
ompi_datatype_destroy (&ompio_fh->f_iov_type);
}
if ( MPI_DATATYPE_NULL != ompio_fh->f_etype ) {
ompi_datatype_destroy (&ompio_fh->f_etype);
}
if ( MPI_DATATYPE_NULL != ompio_fh->f_filetype ){
ompi_datatype_destroy (&ompio_fh->f_filetype);
}
if (MPI_COMM_NULL != ompio_fh->f_comm && (ompio_fh->f_flags & OMPIO_SHAREDFP_IS_SET) ) {
ompi_comm_free (&ompio_fh->f_comm);
}

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

@ -139,6 +139,9 @@ int mca_io_ompio_file_set_view (ompi_file_t *fp,
data = (mca_io_ompio_data_t *) fp->f_io_selected_data;
fh = &data->ompio_fh;
ompi_datatype_destroy (&fh->f_etype);
ompi_datatype_destroy (&fh->f_filetype);
if (NULL != fh->f_decoded_iov) {
free (fh->f_decoded_iov);
fh->f_decoded_iov = NULL;