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

Commit 18df11d0 authored by Yan, Zheng's avatar Yan, Zheng Committed by J. Bruce Fields
Browse files

nfsd4: fix memory leak in nfsd4_encode_fattr()



fh_put() does not free the temporary file handle.

Signed-off-by: default avatarYan, Zheng <zheng.z.yan@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 30646394
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);