mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
NFSv4: Fix a credential leak in _nfs4_discover_trunking()
[ Upstream commite83458fce0] Fixes:4f40a5b554("NFSv4: Add an fattr allocation to _nfs4_discover_trunking()") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7f6607c884
commit
c6aca4c7ba
@@ -3987,7 +3987,7 @@ static int _nfs4_discover_trunking(struct nfs_server *server,
|
||||
|
||||
page = alloc_page(GFP_KERNEL);
|
||||
if (!page)
|
||||
return -ENOMEM;
|
||||
goto out_put_cred;
|
||||
locations = kmalloc(sizeof(struct nfs4_fs_locations), GFP_KERNEL);
|
||||
if (!locations)
|
||||
goto out_free;
|
||||
@@ -4003,6 +4003,8 @@ out_free_2:
|
||||
kfree(locations);
|
||||
out_free:
|
||||
__free_page(page);
|
||||
out_put_cred:
|
||||
put_cred(cred);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user