@@ -227,15 +227,15 @@ static void do_recv(int source_pe, pmix_data_buffer_t* buffer)
227
227
PMIx_Data_pack (NULL , msg , & msg_type , 1 , PMIX_UINT8 );
228
228
229
229
if (OSHMEM_SUCCESS != pack_local_mkeys (msg , source_pe , seg )) {
230
- OBJ_RELEASE (msg );
230
+ PMIX_DATA_BUFFER_RELEASE (msg );
231
231
goto send_fail ;
232
232
}
233
233
234
234
rc = send_buffer (source_pe , msg );
235
+ PMIX_DATA_BUFFER_RELEASE (msg );
235
236
if (MPI_SUCCESS != rc ) {
236
237
MEMHEAP_ERROR ("FAILED to send rml message %d" , rc );
237
238
OMPI_ERROR_LOG (rc );
238
- OBJ_RELEASE (msg );
239
239
goto send_fail ;
240
240
}
241
241
break ;
@@ -272,10 +272,10 @@ static void do_recv(int source_pe, pmix_data_buffer_t* buffer)
272
272
PMIx_Data_pack (NULL , msg , & msg_type , 1 , PMIX_UINT8 );
273
273
274
274
rc = send_buffer (source_pe , msg );
275
+ PMIX_DATA_BUFFER_RELEASE (msg );
275
276
if (MPI_SUCCESS != rc ) {
276
277
MEMHEAP_ERROR ("FAILED to send rml message %d" , rc );
277
278
OMPI_ERROR_LOG (rc );
278
- OBJ_RELEASE (msg );
279
279
}
280
280
281
281
}
@@ -451,7 +451,6 @@ static int send_buffer(int pe, pmix_data_buffer_t *msg)
451
451
PMIX_DATA_BUFFER_UNLOAD (msg , buffer , size );
452
452
rc = PMPI_Send (buffer , size , MPI_BYTE , pe , 0 , oshmem_comm_world );
453
453
free (buffer );
454
- PMIX_DATA_BUFFER_RELEASE (msg );
455
454
456
455
MEMHEAP_VERBOSE (5 , "message sent: dst=%d, rc=%d, %d bytes!" , pe , rc , size );
457
456
return rc ;
@@ -494,6 +493,7 @@ static int memheap_oob_get_mkeys(shmem_ctx_t ctx, int pe, uint32_t seg, sshmem_m
494
493
PMIx_Data_pack (NULL , msg , & seg , 1 , PMIX_UINT32 );
495
494
496
495
rc = send_buffer (pe , msg );
496
+ PMIX_DATA_BUFFER_RELEASE (msg );
497
497
if (MPI_SUCCESS != rc ) {
498
498
OPAL_THREAD_UNLOCK (& memheap_oob .lck );
499
499
MEMHEAP_ERROR ("FAILED to send rml message %d" , rc );
0 commit comments