mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 11:20:49 +07:00
nfsd4: fix memory leak in nfsd4_encode_fattr()
fh_put() does not free the temporary file handle. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com> Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
parent
3064639423
commit
18df11d0ea
@ -2500,8 +2500,10 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp,
|
||||
security_release_secctx(context, contextlen);
|
||||
#endif /* CONFIG_NFSD_V4_SECURITY_LABEL */
|
||||
kfree(acl);
|
||||
if (tempfh)
|
||||
if (tempfh) {
|
||||
fh_put(tempfh);
|
||||
kfree(tempfh);
|
||||
}
|
||||
return status;
|
||||
out_nfserr:
|
||||
status = nfserrno(err);
|
||||
|
Loading…
Reference in New Issue
Block a user