Commit 864db966 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wininet: Fix two handle leaks in the test.

parent 42aa4e46
......@@ -753,7 +753,7 @@ static void InternetOpenUrlA_test(void)
SetLastError(0);
myhttp = InternetOpenUrl(myhinternet, TEST_URL, 0, 0,
INTERNET_FLAG_RELOAD|INTERNET_FLAG_NO_CACHE_WRITE|INTERNET_FLAG_TRANSFER_BINARY,0);
if (GetLastError() == 12007)
if (GetLastError() == ERROR_INTERNET_NAME_NOT_RESOLVED)
return; /* WinXP returns this when not connected to the net */
ok((myhttp != 0),"InternetOpenUrl failed, error %u\n",GetLastError());
ret = InternetReadFile(myhttp, buffer,0x400,&readbytes);
......@@ -762,6 +762,9 @@ static void InternetOpenUrlA_test(void)
while (readbytes && InternetReadFile(myhttp, buffer,0x400,&readbytes))
totalbytes += readbytes;
trace("read 0x%08x bytes\n",totalbytes);
InternetCloseHandle(myhttp);
InternetCloseHandle(myhinternet);
}
static void InternetTimeFromSystemTimeA_test(void)
......
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