Skip to content

Commit f6b3df2

Browse files
committed
fix coverty warning 72107
1 parent 4c6c0af commit f6b3df2

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

ompi/mca/io/ompio/io_ompio.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,20 +1452,21 @@ int ompi_io_ompio_distribute_file_view (mca_io_ompio_file_t *fh,
14521452
}
14531453
*/
14541454
exit:
1455-
for (i=0 ; i<num_aggregators ; i++) {
1456-
if (NULL != broken[i]) {
1457-
free (broken[i]);
1455+
1456+
if (NULL != broken) {
1457+
for (i=0 ; i<num_aggregators ; i++) {
1458+
if (NULL != broken[i]) {
1459+
free (broken[i]);
1460+
}
14581461
}
1462+
free (broken);
14591463
}
14601464
if (NULL != req) {
14611465
free (req);
14621466
}
14631467
if (NULL != sendreq) {
14641468
free (sendreq);
14651469
}
1466-
if (NULL != broken) {
1467-
free (broken);
1468-
}
14691470
free (num_entries);
14701471
free (broken_index);
14711472
if (NULL != displs) {

0 commit comments

Comments
 (0)