Skip to content

Commit 2e1b1d3

Browse files
committed
Safety first !
1 parent 50cec45 commit 2e1b1d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ompi/mca/pml/ob1/pml_ob1_sendreq.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,14 +226,15 @@ static inline void mca_pml_ob1_send_request_fini (mca_pml_ob1_send_request_t *se
226226
}
227227

228228
/*
229-
* Release resources associated with a request
229+
* Release resources associated with a request and return the request.
230230
*/
231231

232232
#define MCA_PML_OB1_SEND_REQUEST_RETURN(sendreq) \
233233
do { \
234234
mca_pml_ob1_send_request_fini (sendreq); \
235235
opal_free_list_return ( &mca_pml_base_send_requests, \
236236
(opal_free_list_item_t*)sendreq); \
237+
sendreq = NULL; /* for safety */ \
237238
} while(0)
238239

239240

0 commit comments

Comments
 (0)