Skip to content

Commit d1e1ec5

Browse files
committed
ompio: correctly fix a memory plug
as newly reported by Coverity with CID 1372660
1 parent 84e178c commit d1e1ec5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ompi/mca/io/ompio/io_ompio_aggregators.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -881,12 +881,13 @@ int mca_io_ompio_merge_groups(mca_io_ompio_file_t *fh,
881881
{
882882
int i = 0;
883883
int *sizes_old_group;
884-
int ret = OMPI_SUCCESS;
885-
int *displs;
884+
int ret;
885+
int *displs = NULL;
886886

887887
sizes_old_group = (int*)malloc(num_merge_aggrs * sizeof(int));
888888
if (NULL == sizes_old_group) {
889889
opal_output (1, "OUT OF MEMORY\n");
890+
ret = OMPI_ERR_OUT_OF_RESOURCE;
890891
goto exit;
891892
}
892893

0 commit comments

Comments
 (0)