Commit 2b8a6a3a authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

wininet: Fix a memory leak.

parent 60c56244
......@@ -369,12 +369,16 @@ BOOL WINAPI InternetGetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName,
{
szCookieData = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
if( !szCookieData )
return FALSE;
r = InternetGetCookieW( szUrl, szCookieName, szCookieData, &len );
{
r = FALSE;
}
else
{
r = InternetGetCookieW( szUrl, szCookieName, szCookieData, &len );
*lpdwSize = WideCharToMultiByte( CP_ACP, 0, szCookieData, len,
lpCookieData, *lpdwSize, NULL, NULL );
*lpdwSize = WideCharToMultiByte( CP_ACP, 0, szCookieData, len,
lpCookieData, *lpdwSize, NULL, NULL );
}
}
HeapFree( GetProcessHeap(), 0, szCookieData );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment