RDMA/cxgb4: Don't use null ep ptr
In c4iw_modify_qp() error path, only use qhp->ep if ep is not already set. Otherwise qhp->ep can be NULL and we crash. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
parent
c8e081a1bf
commit
af93fb5dcc
1 changed files with 2 additions and 1 deletions
|
@ -1305,7 +1305,8 @@ err:
|
||||||
|
|
||||||
/* disassociate the LLP connection */
|
/* disassociate the LLP connection */
|
||||||
qhp->attr.llp_stream_handle = NULL;
|
qhp->attr.llp_stream_handle = NULL;
|
||||||
ep = qhp->ep;
|
if (!ep)
|
||||||
|
ep = qhp->ep;
|
||||||
qhp->ep = NULL;
|
qhp->ep = NULL;
|
||||||
qhp->attr.state = C4IW_QP_STATE_ERROR;
|
qhp->attr.state = C4IW_QP_STATE_ERROR;
|
||||||
free = 1;
|
free = 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue