Module: wine Branch: master Commit: 864db96626f5a1f9cf813dc42bdc226bd13ef46c URL: http://source.winehq.org/git/wine.git/?a=commit;h=864db96626f5a1f9cf813dc42b...
Author: Hans Leidekker hans@it.vu.nl Date: Sun Nov 11 13:35:06 2007 +0100
wininet: Fix two handle leaks in the test.
---
dlls/wininet/tests/http.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index a8f989b..4a28db9 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -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)