Commit 5d88c0cb authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

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

parent ba6aec70
...@@ -1937,6 +1937,7 @@ static void test_null_provider(void) ...@@ -1937,6 +1937,7 @@ static void test_null_provider(void)
result = CryptGetUserKey(prov, AT_SIGNATURE, &key); result = CryptGetUserKey(prov, AT_SIGNATURE, &key);
ok(result, "CryptGetUserKey failed: %08x\n", GetLastError()); ok(result, "CryptGetUserKey failed: %08x\n", GetLastError());
CryptDestroyKey(key); CryptDestroyKey(key);
CryptReleaseContext(prov, 0);
CryptAcquireContext(&prov, szContainer, NULL, PROV_RSA_FULL, CryptAcquireContext(&prov, szContainer, NULL, PROV_RSA_FULL,
CRYPT_DELETEKEYSET); CRYPT_DELETEKEYSET);
...@@ -1956,9 +1957,11 @@ static void test_null_provider(void) ...@@ -1956,9 +1957,11 @@ static void test_null_provider(void)
result = CryptGetUserKey(prov, AT_KEYEXCHANGE, &key); result = CryptGetUserKey(prov, AT_KEYEXCHANGE, &key);
ok (result, "CryptGetUserKey failed with error %08x\n", GetLastError()); ok (result, "CryptGetUserKey failed with error %08x\n", GetLastError());
CryptDestroyKey(key); CryptDestroyKey(key);
CryptReleaseContext(prov, 0);
CryptAcquireContext(&prov, szContainer, NULL, PROV_RSA_FULL, CryptAcquireContext(&prov, szContainer, NULL, PROV_RSA_FULL,
CRYPT_DELETEKEYSET); CRYPT_DELETEKEYSET);
CryptReleaseContext(prov, 0);
/* test the machine key set */ /* test the machine key set */
CryptAcquireContext(&prov, szContainer, NULL, PROV_RSA_FULL, CryptAcquireContext(&prov, szContainer, NULL, PROV_RSA_FULL,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment