Discard SmartcardCerts in case of error.

This commit is contained in:
akallabeth 2022-03-03 07:42:44 +01:00 committed by akallabeth
parent aef3cb16fa
commit 850e0b107f

View File

@ -426,6 +426,8 @@ static BOOL smartcard_hw_enumerateCerts(const rdpSettings* settings, LPCWSTR csp
NCryptFreeBuffer(enumState);
NCryptFreeObject((NCRYPT_HANDLE)provider);
out:
if (!ret)
smartcardCerts_Free(certs);
free(scope);
return ret;
}