Skip to content

Commit f71381c

Browse files
committed
btl/tcp: do not call frag callback if it does not exist
Signed-off-by: Nathan Hjelm <hjelmn@google.com>
1 parent 3e31775 commit f71381c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

opal/mca/btl/tcp/btl_tcp_endpoint.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,9 @@ static void mca_btl_tcp_endpoint_send_handler(int sd, short flags, void* user)
11011101
/* if required - update request status and release fragment */
11021102
OPAL_THREAD_UNLOCK(&btl_endpoint->endpoint_send_lock);
11031103
assert( frag->base.des_flags & MCA_BTL_DES_SEND_ALWAYS_CALLBACK );
1104-
frag->base.des_cbfunc(&frag->btl->super, frag->endpoint, &frag->base, frag->rc);
1104+
if (NULL != frag->base.des_cbfunc) {
1105+
frag->base.des_cbfunc(&frag->btl->super, frag->endpoint, &frag->base, frag->rc);
1106+
}
11051107
if( btl_ownership ) {
11061108
MCA_BTL_TCP_FRAG_RETURN(frag);
11071109
}

0 commit comments

Comments
 (0)