Skip to content

Commit 4bdddfb

Browse files
committed
io/ompio: fix grouping option
changing the value of mca_io_ompio_grouping_option lead to a segfault due to a double-free problem. Remove the erroneous free statements that have been introduced and add a note ensuring that we are not re-adding them back at that spot. fixes issue #3903 Signed-off-by: Edgar Gabriel <[email protected]>
1 parent b0692c6 commit 4bdddfb

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

ompi/mca/io/ompio/io_ompio_aggregators.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,15 +1286,11 @@ int mca_io_ompio_prepare_to_group(mca_io_ompio_file_t *fh,
12861286
fh->f_comm);
12871287

12881288
exit:
1289-
if (NULL != aggr_bytes_per_group_tmp) {
1290-
free(aggr_bytes_per_group_tmp);
1291-
}
1292-
if (NULL != start_offsets_lens_tmp) {
1293-
free(start_offsets_lens_tmp);
1294-
}
1295-
if (NULL != end_offsets_tmp) {
1296-
free(end_offsets_tmp);
1297-
}
1289+
/* Do not free aggr_bytes_per_group_tmp,
1290+
** start_offsets_lens_tmp, and end_offsets_tmp
1291+
** here. The memory is released in the layer above.
1292+
*/
1293+
12981294

12991295
return ret;
13001296
}

0 commit comments

Comments
 (0)