Commit 58b1e2a4 authored by Lionel Ulmer's avatar Lionel Ulmer Committed by Alexandre Julliard

Fix 'SendAsyncCallback' when it's really asynchronous.

parent cc89feb9
......@@ -2735,6 +2735,9 @@ static VOID INTERNET_ExecuteWork(void)
SendSyncCallback(workRequest.hdr,
req->dwContext, req->dwInternetStatus, req->lpvStatusInfo,
req->dwStatusInfoLength);
/* And frees the copy of the status info */
HeapFree(GetProcessHeap(), 0, req->lpvStatusInfo);
}
break;
......
......@@ -276,13 +276,20 @@ VOID SendAsyncCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
{
WORKREQUEST workRequest;
struct WORKREQ_SENDCALLBACK *req;
void *lpvStatusInfo_copy = lpvStatusInfo;
if (lpvStatusInfo)
{
lpvStatusInfo_copy = HeapAlloc(GetProcessHeap(), 0, dwStatusInfoLength);
memcpy(lpvStatusInfo_copy, lpvStatusInfo, dwStatusInfoLength);
}
workRequest.asyncall = SENDCALLBACK;
workRequest.hdr = WININET_AddRef( hdr );
req = &workRequest.u.SendCallback;
req->dwContext = dwContext;
req->dwInternetStatus = dwInternetStatus;
req->lpvStatusInfo = lpvStatusInfo;
req->lpvStatusInfo = lpvStatusInfo_copy;
req->dwStatusInfoLength = dwStatusInfoLength;
INTERNET_AsyncCall(&workRequest);
......
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