crypt32: Fix key buffer leak (Coverity).

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Nikolay Sivov 2018-07-11 08:42:01 +03:00 committed by Alexandre Julliard
parent 5ae2b885e7
commit 568673282c
1 changed files with 1 additions and 0 deletions

View File

@ -2553,6 +2553,7 @@ static BOOL CNG_ImportECCPubKey(CERT_PUBLIC_KEY_INFO *pubKeyInfo, BCRYPT_KEY_HAN
memcpy(ecckey + 1, pubKeyInfo->PublicKey.pbData + 1, pubKeyInfo->PublicKey.cbData - 1);
status = BCryptImportKeyPair(alg, NULL, BCRYPT_ECCPUBLIC_BLOB, key, (BYTE*)ecckey, ecckey_len, 0);
CryptMemFree(ecckey);
done:
if (alg) BCryptCloseAlgorithmProvider(alg, 0);