Skip to content

Commit

Permalink
SUNRPC: Remove resource leak in svc_rdma_send_error()
Browse files Browse the repository at this point in the history
We leak the memory allocated to 'ctxt' when we return after
'ib_dma_mapping_error()' returns !=0.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
  • Loading branch information
Jesper Juhl authored and J. Bruce Fields committed Mar 17, 2011
1 parent 5a02ab7 commit 4be34b9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/sunrpc/xprtrdma/svc_rdma_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1335,6 +1335,7 @@ void svc_rdma_send_error(struct svcxprt_rdma *xprt, struct rpcrdma_msg *rmsgp,
p, 0, length, DMA_FROM_DEVICE);
if (ib_dma_mapping_error(xprt->sc_cm_id->device, ctxt->sge[0].addr)) {
put_page(p);
svc_rdma_put_context(ctxt, 1);
return;
}
atomic_inc(&xprt->sc_dma_used);
Expand Down

0 comments on commit 4be34b9

Please sign in to comment.