From 3a76eccf16eea39cc1f7e256bd5e151573fa72ef Mon Sep 17 00:00:00 2001 From: akallabeth Date: Thu, 11 Apr 2024 13:01:46 +0200 Subject: [PATCH] [coverity] 1543171 Resource leak --- winpr/libwinpr/sspi/NTLM/ntlm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winpr/libwinpr/sspi/NTLM/ntlm.c b/winpr/libwinpr/sspi/NTLM/ntlm.c index e23c82d9d..bc16a40e4 100644 --- a/winpr/libwinpr/sspi/NTLM/ntlm.c +++ b/winpr/libwinpr/sspi/NTLM/ntlm.c @@ -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);