Commit 351461f3 authored by Chuck Lever's avatar Chuck Lever

svcrdma: Don't leak send_ctxt on Send errors

Address a rare send_ctxt leak in the svc_rdma_sendto() error paths.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent b73ac680
......@@ -936,7 +936,7 @@ int svc_rdma_sendto(struct svc_rqst *rqstp)
p = xdr_reserve_space(&sctxt->sc_stream,
rpcrdma_fixed_maxsz * sizeof(*p));
if (!p)
goto err0;
goto err1;
ret = svc_rdma_send_reply_chunk(rdma, rctxt, &rqstp->rq_res);
if (ret < 0)
......@@ -948,11 +948,11 @@ int svc_rdma_sendto(struct svc_rqst *rqstp)
*p = pcl_is_empty(&rctxt->rc_reply_pcl) ? rdma_msg : rdma_nomsg;
if (svc_rdma_encode_read_list(sctxt) < 0)
goto err0;
goto err1;
if (svc_rdma_encode_write_list(rctxt, sctxt) < 0)
goto err0;
goto err1;
if (svc_rdma_encode_reply_chunk(rctxt, sctxt, ret) < 0)
goto err0;
goto err1;
ret = svc_rdma_send_reply_msg(rdma, sctxt, rctxt, rqstp);
if (ret < 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