提交 1b3859bc 编写于 作者: A Alexander Strakh 提交者: Steve French

[CIFS] Memory leak in ntlmv2 hash calculation

 in function calc_ntlmv2_hash memory is not released.
1. If in the line 333 we successfully allocate memory and assign it to
pctxt variable:
       pctxt = kmalloc(sizeof(struct HMACMD5Context), GFP_KERNEL);
then we go to line 376 and exit wihout releasing memory pointed to by pctxt
variable.

Add a memory  releasing for pctxt variable before exit from function
calc_ntlmv2_hash.
Signed-off-by: NAlexander Strakh <strakh@ispras.ru>
Signed-off-by: NSteve French <sfrench@us.ibm.com>
上级 2920ee2b
......@@ -373,6 +373,7 @@ static int calc_ntlmv2_hash(struct cifsSesInfo *ses,
compare with the NTLM example */
hmac_md5_final(ses->server->ntlmv2_hash, pctxt);
kfree(pctxt);
return rc;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册