Commit 1a832746 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wininet: Don't release the parent object in FTP_Connect, the caller will do that.

parent 5f5df832
......@@ -2062,7 +2062,6 @@ lerror:
if (!bSuccess && handle)
{
WININET_Release( &hIC->hdr );
WININET_FreeHandle( handle );
handle = NULL;
}
......
......@@ -668,19 +668,21 @@ START_TEST(ftp)
hInternet = InternetOpen("winetest", 0, NULL, NULL, 0);
ok(hInternet != NULL, "InternetOpen failed: %u\n", GetLastError());
SetLastError(0xdeadbeef);
hFtp = InternetConnect(hInternet, "ftp.winehq.org", INTERNET_DEFAULT_FTP_PORT, "anonymous", NULL, INTERNET_SERVICE_FTP, INTERNET_FLAG_PASSIVE, 0);
ok(hFtp != NULL, "InternetOpen failed: %u\n", GetLastError());
SetLastError(0xdeadbeef);
hHttp = InternetConnect(hInternet, "www.winehq.org", INTERNET_DEFAULT_HTTP_PORT, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0);
ok(hFtp != NULL, "InternetOpen failed: %u\n", GetLastError());
if (!hFtp)
{
InternetCloseHandle(hInternet);
skip("No ftp connection could be made to ftp.winehq.org\n");
return;
}
hHttp = InternetConnect(hInternet, "www.winehq.org", INTERNET_DEFAULT_HTTP_PORT, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0);
if (!hHttp)
{
InternetCloseHandle(hFtp);
InternetCloseHandle(hInternet);
skip("No http connection could be made to www.winehq.org\n");
return;
}
/* The first call should always be a proper InternetOpen, if not
* several calls will return ERROR_INTERNET_NOT_INITIALIZED when
......
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