Skip to content

Commit 4e4c43e

Browse files
authored
Merge pull request #11163 from drwootton/osc_comp_select_leak
Fix additional memory leaks in component_select
2 parents 1dd8dc4 + 789c532 commit 4e4c43e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ompi/mca/osc/sm/osc_sm_component.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ component_select(struct ompi_win_t *win, void **base, size_t size, int disp_unit
294294
module->comm->c_coll->coll_allgather_module);
295295
if (OMPI_SUCCESS != ret) {
296296
free(rbuf);
297-
return ret;
297+
goto error;
298298
}
299299

300300
total = 0;
@@ -317,7 +317,8 @@ component_select(struct ompi_win_t *win, void **base, size_t size, int disp_unit
317317
ompi_comm_print_cid(module->comm));
318318
if (ret < 0) {
319319
free(rbuf);
320-
return OMPI_ERR_OUT_OF_RESOURCE;
320+
ret = OMPI_ERR_OUT_OF_RESOURCE;
321+
goto error;
321322
}
322323

323324
ret = opal_shmem_segment_create (&module->seg_ds, data_file, total + data_base_size);

0 commit comments

Comments
 (0)