Skip to content

Commit df3b16e

Browse files
committed
pml/cm: release datatype object in send completion callback
This change fixes a memory leak caused by not decreasing datatype object reference count when the send request completes. Signed-off-by: Wenduo Wang <[email protected]> (cherry picked from commit 64747a2)
1 parent 4bb5e68 commit df3b16e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ompi/mca/pml/cm/pml_cm_sendreq.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ do {
452452
#define MCA_PML_CM_HVY_SEND_REQUEST_RETURN(sendreq) \
453453
{ \
454454
/* Let the base handle the reference counts */ \
455-
OMPI_DATATYPE_RETAIN(sendreq->req_send.req_base.req_datatype); \
455+
OMPI_DATATYPE_RELEASE(sendreq->req_send.req_base.req_datatype); \
456456
OBJ_RELEASE(sendreq->req_send.req_base.req_comm); \
457457
OMPI_REQUEST_FINI(&sendreq->req_send.req_base.req_ompi); \
458458
opal_convertor_cleanup( &(sendreq->req_send.req_base.req_convertor) ); \
@@ -489,7 +489,7 @@ do { \
489489
#define MCA_PML_CM_THIN_SEND_REQUEST_RETURN(sendreq) \
490490
{ \
491491
/* Let the base handle the reference counts */ \
492-
OMPI_DATATYPE_RETAIN(sendreq->req_send.req_base.req_datatype); \
492+
OMPI_DATATYPE_RELEASE(sendreq->req_send.req_base.req_datatype); \
493493
OBJ_RELEASE(sendreq->req_send.req_base.req_comm); \
494494
OMPI_REQUEST_FINI(&sendreq->req_send.req_base.req_ompi); \
495495
opal_convertor_cleanup( &(sendreq->req_send.req_base.req_convertor) ); \

0 commit comments

Comments
 (0)