[Bug 20684] Memory leak in CryptGenKey/CryptDestroyKey?

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Dec 7 16:07:01 CST 2009


http://bugs.winehq.org/show_bug.cgi?id=20684


Juan Lang <juan_lang at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|CLOSED                      |REOPENED
         Resolution|INVALID                     |




--- Comment #9 from Juan Lang <juan_lang at yahoo.com>  2009-12-07 16:07:00 ---
I'm going to reopen this now that Dan's valgrind logs include leaks for the
Wine test suite, and rsaenh shows leaks.  E.g. here's the latest log:
http://kegel.com/wine/valgrind/logs/2009-12-07-08.39/vg-rsaenh_rsaenh.txt

It includes leaks such as:
 972 bytes in 1 blocks are definitely lost 
    at  notify_alloc (heap.c:247)
    by  RtlAllocateHeap (heap.c:1697)
    by  ???
    by  ???
    by  ???
    by  ???
    by  ???
    by  ???
    by  ???
    by  CryptAcquireContextW (crypt.c:505)
    by  CryptAcquireContextA (crypt.c:573)
    by  test_key_initialization (rsaenh.c:2528)
    by  func_rsaenh (rsaenh.c:2564)
    by  run_test (test.h:535)
    by  main (test.h:585)

The referenced line of test_key_initialization is included in this body:
    result = CryptAcquireContext(&prov2, szContainer, szProvider,
PROV_RSA_FULL, 0);
    ok(result, "%08x\n", GetLastError());
    result = CryptGetUserKey(prov2, AT_KEYEXCHANGE, &hKey);
    ok(result, "%08x\n", GetLastError());
    if (result) CryptDestroyKey(hKey);
    CryptReleaseContext(prov2, 0);

It appears to me as though the reference counting is valid here, so the report
of a leak seems accurate.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list