Fix alloc failure check in CryptEnumProvidersW.

This commit is contained in:
James Hawkins 2004-08-09 18:51:48 +00:00 committed by Alexandre Julliard
parent 830fb08b7d
commit 62851fdb52
1 changed files with 1 additions and 1 deletions

View File

@ -1012,7 +1012,7 @@ BOOL WINAPI CryptEnumProvidersW (DWORD dwIndex, DWORD *pdwReserved,
pdwProvType, pszProvName, pcbProvName);
strlen = *pcbProvName / sizeof(WCHAR);
if ( pszProvName && (str = CRYPT_Alloc(strlen)) )
if ( pszProvName && !(str = CRYPT_Alloc(strlen)) )
CRYPT_ReturnLastError(ERROR_NOT_ENOUGH_MEMORY);
ret = CryptEnumProvidersA(dwIndex, pdwReserved, dwFlags, pdwProvType, str, &strlen);
if (str)