wininet: Fixed typos in two out-of-memory checks.

This commit is contained in:
Joris Huizer 2008-03-13 17:41:49 +01:00 committed by Alexandre Julliard
parent a9947cdf7d
commit 4fca67e651
1 changed files with 2 additions and 2 deletions

View File

@ -2961,7 +2961,7 @@ INTERNETAPI HANDLE WINAPI FindFirstUrlCacheEntryA(LPCSTR lpszUrlSearchPattern,
{ {
int len = MultiByteToWideChar(CP_ACP, 0, lpszUrlSearchPattern, -1, NULL, 0); int len = MultiByteToWideChar(CP_ACP, 0, lpszUrlSearchPattern, -1, NULL, 0);
pEntryHandle->lpszUrlSearchPattern = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); pEntryHandle->lpszUrlSearchPattern = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
if (!pEntryHandle) if (!pEntryHandle->lpszUrlSearchPattern)
{ {
HeapFree(GetProcessHeap(), 0, pEntryHandle); HeapFree(GetProcessHeap(), 0, pEntryHandle);
return NULL; return NULL;
@ -3002,7 +3002,7 @@ INTERNETAPI HANDLE WINAPI FindFirstUrlCacheEntryW(LPCWSTR lpszUrlSearchPattern,
{ {
int len = strlenW(lpszUrlSearchPattern); int len = strlenW(lpszUrlSearchPattern);
pEntryHandle->lpszUrlSearchPattern = HeapAlloc(GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR)); pEntryHandle->lpszUrlSearchPattern = HeapAlloc(GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR));
if (!pEntryHandle) if (!pEntryHandle->lpszUrlSearchPattern)
{ {
HeapFree(GetProcessHeap(), 0, pEntryHandle); HeapFree(GetProcessHeap(), 0, pEntryHandle);
return NULL; return NULL;