mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 13:10:28 +00:00
rpcrt4: Use an alertable wait in rpcrt4_protseq_np_wait_for_new_connection to fix a small memory leak flagged by Valgrind.
This is called only by the RPCRT4_server_thread so we don't have to worry about application user APCs being run at improper times.
This commit is contained in:
parent
83a02c545c
commit
7092590c90
@ -605,7 +605,15 @@ static int rpcrt4_protseq_np_wait_for_new_connection(RpcServerProtseq *protseq,
|
|||||||
if (!objs)
|
if (!objs)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
res = WaitForMultipleObjects(count, objs, FALSE, INFINITE);
|
do
|
||||||
|
{
|
||||||
|
/* an alertable wait isn't strictly necessary, but due to our
|
||||||
|
* overlapped I/O implementation in Wine we need to free some memory
|
||||||
|
* by the file user APC being called, even if no completion routine was
|
||||||
|
* specified at the time of starting the async operation */
|
||||||
|
res = WaitForMultipleObjectsEx(count, objs, FALSE, INFINITE, TRUE);
|
||||||
|
} while (res == WAIT_IO_COMPLETION);
|
||||||
|
|
||||||
if (res == WAIT_OBJECT_0)
|
if (res == WAIT_OBJECT_0)
|
||||||
return 0;
|
return 0;
|
||||||
else if (res == WAIT_FAILED)
|
else if (res == WAIT_FAILED)
|
||||||
|
Loading…
Reference in New Issue
Block a user