diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2018-11-30 22:11:15 +0100 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2018-12-02 15:43:57 +0100 |
commit | 71700bb96047f68a0aae3932466fc7c9ad5ce6c0 (patch) | |
tree | 4f47237b48cadead1e894ca6836dba19f19def1d /net/sunrpc/clnt.c | |
parent | SUNRPC: Fix leak of krb5p encode pages (diff) | |
download | linux-71700bb96047f68a0aae3932466fc7c9ad5ce6c0.tar.xz linux-71700bb96047f68a0aae3932466fc7c9ad5ce6c0.zip |
SUNRPC: Fix a memory leak in call_encode()
If we retransmit an RPC request, we currently end up clobbering the
value of req->rq_rcv_buf.bvec that was allocated by the initial call to
xprt_request_prepare(req).
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r-- | net/sunrpc/clnt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index e35d642558e7..c6782aa47525 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -2309,6 +2309,7 @@ out_retry: task->tk_status = 0; /* Note: rpc_verify_header() may have freed the RPC slot */ if (task->tk_rqstp == req) { + xdr_free_bvec(&req->rq_rcv_buf); req->rq_reply_bytes_recvd = req->rq_rcv_buf.len = 0; if (task->tk_client->cl_discrtry) xprt_conditional_disconnect(req->rq_xprt, |