提交 18df11d0 编写于 作者: Y Yan, Zheng 提交者: J. Bruce Fields

nfsd4: fix memory leak in nfsd4_encode_fattr()

fh_put() does not free the temporary file handle.
Signed-off-by: NYan, Zheng <zheng.z.yan@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
上级 30646394
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册