2 Jun
2009
2 Jun
'09
5:08 a.m.
Jason Green <jave27(a)gmail.com> writes:
@@ -4213,10 +4213,10 @@ static INT HTTP_GetResponseHeaders(LPWININETHTTPREQW lpwhr, BOOL clear)
/* regenerate raw headers */ while (cchRawHeaders + buflen + strlenW(szCrLf) > cchMaxRawHeaders) - { cchMaxRawHeaders *= 2; - lpszRawHeaders = HeapReAlloc(GetProcessHeap(), 0, lpszRawHeaders, (cchMaxRawHeaders+1)*sizeof(WCHAR)); - } + lpszRawHeaders = HeapReAlloc(GetProcessHeap(), 0, lpszRawHeaders, (cchMaxRawHeaders+1)*sizeof(WCHAR)); + if (lpszRawHeaders == NULL) + goto lend;
If you are going to check the allocation, then you should handle the error properly too instead of leaking memory. -- Alexandre Julliard julliard(a)winehq.org