wininet: Fixed typos in two out-of-memory checks.
This commit is contained in:
parent
a9947cdf7d
commit
4fca67e651
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue