mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
rpcrt4: Fix a leak of msg in RPCRT4_io_thread on the error paths.
This commit is contained in:
parent
e0c67a189b
commit
5be085dec5
@ -370,15 +370,18 @@ static DWORD CALLBACK RPCRT4_io_thread(LPVOID the_arg)
|
||||
}
|
||||
|
||||
packet = HeapAlloc(GetProcessHeap(), 0, sizeof(RpcPacket));
|
||||
if (!packet)
|
||||
break;
|
||||
if (!packet) {
|
||||
HeapFree(GetProcessHeap(), 0, msg);
|
||||
break;
|
||||
}
|
||||
packet->conn = conn;
|
||||
packet->hdr = hdr;
|
||||
packet->msg = msg;
|
||||
if (!QueueUserWorkItem(RPCRT4_worker_thread, packet, WT_EXECUTELONGFUNCTION)) {
|
||||
ERR("couldn't queue work item for worker thread, error was %d\n", GetLastError());
|
||||
HeapFree(GetProcessHeap(), 0, packet);
|
||||
break;
|
||||
ERR("couldn't queue work item for worker thread, error was %d\n", GetLastError());
|
||||
HeapFree(GetProcessHeap(), 0, msg);
|
||||
HeapFree(GetProcessHeap(), 0, packet);
|
||||
break;
|
||||
}
|
||||
|
||||
msg = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user