Fix alloc test in CryptEnumProviderTypesW that failed if the alloc
succeeded.
This commit is contained in:
parent
ddad3152a1
commit
25a6a0e08a
|
@ -1126,7 +1126,7 @@ BOOL WINAPI CryptEnumProviderTypesW (DWORD dwIndex, DWORD *pdwReserved,
|
|||
TRACE("(%ld, %p, %08ld, %p, %p, %p)\n", dwIndex, pdwReserved, dwFlags,
|
||||
pdwProvType, pszTypeName, pcbTypeName);
|
||||
strlen = *pcbTypeName / sizeof(WCHAR);
|
||||
if ( pszTypeName && (str = CRYPT_Alloc(strlen)) )
|
||||
if ( pszTypeName && !(str = CRYPT_Alloc(strlen)) )
|
||||
CRYPT_ReturnLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
ret = CryptEnumProviderTypesA(dwIndex, pdwReserved, dwFlags, pdwProvType, str, &strlen);
|
||||
if (str)
|
||||
|
|
Loading…
Reference in New Issue