http://bugs.winehq.org/show_bug.cgi?id=27178
Summary: advapi32: CryptEnumProvidersW may don't free resources Product: Wine Version: unspecified Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: advapi32 AssignedTo: wine-bugs@winehq.org ReportedBy: menone7@gmail.com
CryptEnumProvidersW may don't free resources, if something was wrong with the type registration.
if (RegOpenKeyW(hKey, pszProvName, &subkey)) return FALSE; if (RegQueryValueExW(subkey, typeW, NULL, NULL, (BYTE*)pdwProvType, &size)) return FALSE;
must be
if (RegOpenKeyW(hKey, pszProvName, &subkey)) { RegCloseKey(hKey); SetLastError(NTE_FAIL); return FALSE; } if (RegQueryValueExW(subkey, typeW, NULL, NULL, (BYTE*)pdwProvType, &size)) { RegCloseKey(subkey); RegCloseKey(hKey); SetLastError(NTE_FAIL); return FALSE; }
http://bugs.winehq.org/show_bug.cgi?id=27178
--- Comment #1 from Austin English austinenglish@gmail.com 2011-05-15 12:43:38 CDT --- Please send a patch to wine-patches@winehq.org.
http://bugs.winehq.org/show_bug.cgi?id=27178
--- Comment #2 from Nikolay Sivov bunglehead@gmail.com 2011-05-15 12:54:30 CDT --- This one is questionable:
--- SetLastError(NTE_FAIL); ---
but in general it leaks, yes. Even in more places than you mentioned.
And as Austin said please send a patch for that, but without SetLastError() if you won't add corresponding test.
http://bugs.winehq.org/show_bug.cgi?id=27178
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |1.3.20 Summary|advapi32: |advapi32: |CryptEnumProvidersW may |CryptEnumProvidersW may not |don't free resources |free resources
http://bugs.winehq.org/show_bug.cgi?id=27178
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Severity|normal |minor
--- Comment #3 from Nikolay Sivov bunglehead@gmail.com 2011-08-03 18:59:14 CDT --- http://www.winehq.org/pipermail/wine-patches/2011-August/105219.html
http://bugs.winehq.org/show_bug.cgi?id=27178
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #4 from Nikolay Sivov bunglehead@gmail.com 2011-08-04 12:49:21 CDT --- Fixed by 322049cebf2c08875bfe8fe1d9d62ead6d856079.
http://bugs.winehq.org/show_bug.cgi?id=27178
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org 2011-08-05 12:38:11 CDT --- Closing bugs fixed in 1.3.26.