rsaenh: Fix some leaks of the provider handle in the rsaenh tests.

This commit is contained in:
Rob Shearman 2007-12-06 14:06:06 +00:00 committed by Alexandre Julliard
parent ba6aec70ca
commit 5d88c0cbad
1 changed files with 3 additions and 0 deletions

View File

@ -1937,6 +1937,7 @@ static void test_null_provider(void)
result = CryptGetUserKey(prov, AT_SIGNATURE, &key);
ok(result, "CryptGetUserKey failed: %08x\n", GetLastError());
CryptDestroyKey(key);
CryptReleaseContext(prov, 0);
CryptAcquireContext(&prov, szContainer, NULL, PROV_RSA_FULL,
CRYPT_DELETEKEYSET);
@ -1956,9 +1957,11 @@ static void test_null_provider(void)
result = CryptGetUserKey(prov, AT_KEYEXCHANGE, &key);
ok (result, "CryptGetUserKey failed with error %08x\n", GetLastError());
CryptDestroyKey(key);
CryptReleaseContext(prov, 0);
CryptAcquireContext(&prov, szContainer, NULL, PROV_RSA_FULL,
CRYPT_DELETEKEYSET);
CryptReleaseContext(prov, 0);
/* test the machine key set */
CryptAcquireContext(&prov, szContainer, NULL, PROV_RSA_FULL,