wininet: Moved freeing object to WININET_Release.

This commit is contained in:
Jacek Caban 2011-02-03 20:45:12 +01:00 committed by Alexandre Julliard
parent 14c3387fc2
commit 923498da03
3 changed files with 2 additions and 7 deletions

View File

@ -1127,8 +1127,6 @@ static void FTPFILE_Destroy(object_header_t *hdr)
if (nResCode > 0 && nResCode != 226) WARN("server reports failed transfer\n"); if (nResCode > 0 && nResCode != 226) WARN("server reports failed transfer\n");
WININET_Release(&lpwh->lpFtpSession->hdr); WININET_Release(&lpwh->lpFtpSession->hdr);
HeapFree(GetProcessHeap(), 0, lpwh);
} }
static DWORD FTPFILE_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode) static DWORD FTPFILE_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode)
@ -2346,7 +2344,6 @@ static void FTPSESSION_Destroy(object_header_t *hdr)
HeapFree(GetProcessHeap(), 0, lpwfs->lpszPassword); HeapFree(GetProcessHeap(), 0, lpwfs->lpszPassword);
HeapFree(GetProcessHeap(), 0, lpwfs->lpszUserName); HeapFree(GetProcessHeap(), 0, lpwfs->lpszUserName);
HeapFree(GetProcessHeap(), 0, lpwfs->servername); HeapFree(GetProcessHeap(), 0, lpwfs->servername);
HeapFree(GetProcessHeap(), 0, lpwfs);
} }
static void FTPSESSION_CloseConnection(object_header_t *hdr) static void FTPSESSION_CloseConnection(object_header_t *hdr)
@ -3399,7 +3396,6 @@ static void FTPFINDNEXT_Destroy(object_header_t *hdr)
} }
HeapFree(GetProcessHeap(), 0, lpwfn->lpafp); HeapFree(GetProcessHeap(), 0, lpwfn->lpafp);
HeapFree(GetProcessHeap(), 0, lpwfn);
} }
static DWORD FTPFINDNEXT_FindNextFileProc(WININETFTPFINDNEXTW *find, LPVOID data) static DWORD FTPFINDNEXT_FindNextFileProc(WININETFTPFINDNEXTW *find, LPVOID data)

View File

@ -1601,7 +1601,6 @@ static void HTTPREQ_Destroy(object_header_t *hdr)
#endif #endif
HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders); HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders);
HeapFree(GetProcessHeap(), 0, lpwhr);
} }
static void HTTPREQ_CloseConnection(object_header_t *hdr) static void HTTPREQ_CloseConnection(object_header_t *hdr)
@ -4358,7 +4357,6 @@ static void HTTPSESSION_Destroy(object_header_t *hdr)
HeapFree(GetProcessHeap(), 0, lpwhs->lpszServerName); HeapFree(GetProcessHeap(), 0, lpwhs->lpszServerName);
HeapFree(GetProcessHeap(), 0, lpwhs->lpszPassword); HeapFree(GetProcessHeap(), 0, lpwhs->lpszPassword);
HeapFree(GetProcessHeap(), 0, lpwhs->lpszUserName); HeapFree(GetProcessHeap(), 0, lpwhs->lpszUserName);
HeapFree(GetProcessHeap(), 0, lpwhs);
} }
static DWORD HTTPSESSION_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode) static DWORD HTTPSESSION_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode)

View File

@ -261,6 +261,8 @@ BOOL WININET_Release( object_header_t *info )
LeaveCriticalSection( &WININET_cs ); LeaveCriticalSection( &WININET_cs );
} }
heap_free(info);
} }
return TRUE; return TRUE;
} }
@ -684,7 +686,6 @@ static VOID APPINFO_Destroy(object_header_t *hdr)
HeapFree(GetProcessHeap(), 0, lpwai->lpszProxyBypass); HeapFree(GetProcessHeap(), 0, lpwai->lpszProxyBypass);
HeapFree(GetProcessHeap(), 0, lpwai->lpszProxyUsername); HeapFree(GetProcessHeap(), 0, lpwai->lpszProxyUsername);
HeapFree(GetProcessHeap(), 0, lpwai->lpszProxyPassword); HeapFree(GetProcessHeap(), 0, lpwai->lpszProxyPassword);
HeapFree(GetProcessHeap(), 0, lpwai);
} }
static DWORD APPINFO_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode) static DWORD APPINFO_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode)