Skip to content

Commit 7eea38c

Browse files
author
David Wootton
committed
Fix memory leak in do_recv (memheap_base_mkey.c)
Coverity CID 1498655 Signed-off-by: David Wootton <dwootton@us.ibm.com>
1 parent c498706 commit 7eea38c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

oshmem/mca/memheap/base/memheap_base_mkey.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ static void do_recv(int source_pe, pmix_data_buffer_t* buffer)
235235
if (MPI_SUCCESS != rc) {
236236
MEMHEAP_ERROR("FAILED to send rml message %d", rc);
237237
OMPI_ERROR_LOG(rc);
238+
OBJ_RELEASE(msg);
238239
goto send_fail;
239240
}
240241
break;
@@ -274,6 +275,7 @@ static void do_recv(int source_pe, pmix_data_buffer_t* buffer)
274275
if (MPI_SUCCESS != rc) {
275276
MEMHEAP_ERROR("FAILED to send rml message %d", rc);
276277
OMPI_ERROR_LOG(rc);
278+
OBJ_RELEASE(msg);
277279
}
278280

279281
}

0 commit comments

Comments
 (0)