[coverity] 1543171 Resource leak

This commit is contained in:
akallabeth 2024-04-11 13:01:46 +02:00 committed by Martin Fleisz
parent 70eec6c18e
commit 3a76eccf16

View File

@ -1255,7 +1255,10 @@ static SECURITY_STATUS SEC_ENTRY ntlm_MakeSignature(PCtxtHandle phContext, ULONG
WINPR_HMAC_CTX* hmac = winpr_HMAC_New();
if (!winpr_HMAC_Init(hmac, WINPR_MD_MD5, context->SendSigningKey, WINPR_MD5_DIGEST_LENGTH))
{
winpr_HMAC_Free(hmac);
return SEC_E_INTERNAL_ERROR;
}
Data_Write_UINT32(&seq_no, MessageSeqNo);
winpr_HMAC_Update(hmac, (BYTE*)&seq_no, 4);