Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cdead7cf authored by Trond Myklebust's avatar Trond Myklebust
Browse files

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: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
Acked-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
Cc: stable@kernel.org
parent d812e575
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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;
}