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

Alexandre Julliard julliard at winehq.org
Fri Dec 7 11:02:13 CST 2007


Module: wine
Branch: master
Commit: 5d88c0cbad931cbd0a79faac26f21941a9e558d2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5d88c0cbad931cbd0a79faac26f21941a9e558d2

Author: Rob Shearman <rob at codeweavers.com>
Date:   Thu Dec  6 14:06:06 2007 +0000

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

---

 dlls/rsaenh/tests/rsaenh.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/rsaenh/tests/rsaenh.c b/dlls/rsaenh/tests/rsaenh.c
index b44398d..4b3176c 100644
--- a/dlls/rsaenh/tests/rsaenh.c
+++ b/dlls/rsaenh/tests/rsaenh.c
@@ -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,




More information about the wine-cvs mailing list