diff --git a/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_read_all.c b/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_read_all.c index 63247a65eb..0c29c98de7 100644 --- a/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_read_all.c +++ b/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_read_all.c @@ -500,7 +500,7 @@ exit: if (flat_buf->indices != NULL){ free (flat_buf->indices); } - flat_buf = NULL; + free (flat_buf); } free (start_offsets); diff --git a/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_write_all.c b/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_write_all.c index aaa7eb4289..ac42ec1ecf 100644 --- a/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_write_all.c +++ b/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_write_all.c @@ -274,7 +274,6 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, total_bytes = (size_t) long_total_bytes; if ( 0 == total_bytes ) { - free(aggregator_list); ret = OMPI_SUCCESS; goto exit; }