diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-03-19 15:36:22 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-03-21 12:22:49 -0400 |
commit | cdead7cf12896c0e50a8be2e52de52c364603095 (patch) | |
tree | 0702010a10dadca0a597ab071f3678d5c843047b /net/sunrpc | |
parent | d812e575822a2b7ab1a7cadae2571505ec6ec2bd (diff) | |
download | blackbird-obmc-linux-cdead7cf12896c0e50a8be2e52de52c364603095.tar.gz blackbird-obmc-linux-cdead7cf12896c0e50a8be2e52de52c364603095.zip |
SUNRPC: Fix a potential memory leak in auth_gss
The function alloc_enc_pages() currently fails to release the pointer
rqstp->rq_enc_pages in the error path.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Acked-by: J. Bruce Fields <bfields@citi.umich.edu>
Cc: stable@kernel.org
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index 0cfccc2a0297..c389ccf6437d 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c @@ -1280,9 +1280,8 @@ alloc_enc_pages(struct rpc_rqst *rqstp) rqstp->rq_release_snd_buf = priv_release_snd_buf; return 0; out_free: - for (i--; i >= 0; i--) { - __free_page(rqstp->rq_enc_pages[i]); - } + rqstp->rq_enc_pages_num = i; + priv_release_snd_buf(rqstp); out: return -EAGAIN; } |