Commit c09f3969 authored by Antonio J. Pena's avatar Antonio J. Pena
Browse files

Moved a request assert to an earlier location

An assert protecting from a non-null request was happening too late in pkt_COOKIE_handler from
mpid_nem_lmt.c. This patch moves it to an earlier location so that it's checked before it's first
used.

Reported by Dmitry Polyakov.
parent 4ef8d551
...@@ -462,13 +462,14 @@ static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz ...@@ -462,13 +462,14 @@ static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz
if (cookie_pkt->from_sender) { if (cookie_pkt->from_sender) {
MPID_Request_get_ptr(cookie_pkt->receiver_req_id, req); MPID_Request_get_ptr(cookie_pkt->receiver_req_id, req);
MPIU_Assert(req != NULL);
req->ch.lmt_req_id = cookie_pkt->sender_req_id; req->ch.lmt_req_id = cookie_pkt->sender_req_id;
} }
else { else {
MPID_Request_get_ptr(cookie_pkt->sender_req_id, req); MPID_Request_get_ptr(cookie_pkt->sender_req_id, req);
MPIU_Assert(req != NULL);
req->ch.lmt_req_id = cookie_pkt->receiver_req_id; req->ch.lmt_req_id = cookie_pkt->receiver_req_id;
} }
MPIU_Assert(req != NULL);
if (cookie_pkt->cookie_len != 0) if (cookie_pkt->cookie_len != 0)
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment