Skip to content

Commit 9d432a7

Browse files
committed
common/ompi: fix for CID1645321
parts of this commit could be relevant for 5.0.x Signed-off-by: Edgar Gabriel <Edgar.Gabriel@amd.com>
1 parent 08ac1be commit 9d432a7

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

ompi/mca/common/ompio/common_ompio_buffer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
_tbuf = mca_common_ompio_alloc_buf (_fh, _tmp_buf_size==0 ? _max_data : _tmp_buf_size); \
3030
if ( NULL == _tbuf ) { \
3131
opal_output(1, "common_ompio: error allocating memory\n"); \
32+
opal_convertor_cleanup (_convertor); \
3233
return OMPI_ERR_OUT_OF_RESOURCE; \
3334
} \
3435
if (NULL != _decoded_iov) { \
@@ -43,6 +44,7 @@
4344
_tbuf = mca_common_ompio_alloc_buf (_fh, _tmp_buf_size==0 ? _max_data : _tmp_buf_size); \
4445
if ( NULL == _tbuf ) { \
4546
opal_output(1, "common_ompio: error allocating memory\n"); \
47+
opal_convertor_cleanup (_convertor); \
4648
return OMPI_ERR_OUT_OF_RESOURCE; \
4749
} \
4850
if (NULL != _decoded_iov) { \

ompi/mca/common/ompio/common_ompio_file_read.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ int mca_common_ompio_file_read_pipelined (ompio_file_t *fh, void *buf,
205205
tbuf2 = mca_common_ompio_alloc_buf (fh, bytes_per_cycle);
206206
if (NULL == tbuf2) {
207207
opal_output(1, "common_ompio: error allocating memory\n");
208+
opal_convertor_cleanup (&convertor);
208209
return OMPI_ERR_OUT_OF_RESOURCE;
209210
}
210211
unpackbuf = tbuf2;

0 commit comments

Comments
 (0)