From 0031b40454d81b48f43f6042a80a951a42a1cddb Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Mon, 9 Mar 2009 01:49:20 +0100 Subject: [PATCH] wininet: Release session after FTP_ReceiveResponse call in FTPFILE_Destroy. --- dlls/wininet/ftp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wininet/ftp.c b/dlls/wininet/ftp.c index 01a81059f95..ef1eef10962 100644 --- a/dlls/wininet/ftp.c +++ b/dlls/wininet/ftp.c @@ -1092,8 +1092,6 @@ static void FTPFILE_Destroy(WININETHANDLEHEADER *hdr) TRACE("\n"); - WININET_Release(&lpwh->lpFtpSession->hdr); - if (!lpwh->session_deleted) lpwfs->download_in_progress = NULL; @@ -1103,6 +1101,8 @@ static void FTPFILE_Destroy(WININETHANDLEHEADER *hdr) nResCode = FTP_ReceiveResponse(lpwfs, lpwfs->hdr.dwContext); if (nResCode > 0 && nResCode != 226) WARN("server reports failed transfer\n"); + WININET_Release(&lpwh->lpFtpSession->hdr); + HeapFree(GetProcessHeap(), 0, lpwh); }