mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-12 20:35:23 +02:00
NFSv4: Fix memory leak in nfs4_set_security_label
[ Upstream commit aad11473f8
]
We leak nfs_fattr and nfs4_label every time we set a security xattr.
Signed-off-by: Dmitry Mastykin <mastichi@gmail.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
c7734ddaea
commit
b980906993
|
@ -6268,6 +6268,7 @@ nfs4_set_security_label(struct inode *inode, const void *buf, size_t buflen)
|
||||||
if (status == 0)
|
if (status == 0)
|
||||||
nfs_setsecurity(inode, fattr);
|
nfs_setsecurity(inode, fattr);
|
||||||
|
|
||||||
|
nfs_free_fattr(fattr);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_NFS_V4_SECURITY_LABEL */
|
#endif /* CONFIG_NFS_V4_SECURITY_LABEL */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user