Commit 7092590c authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

rpcrt4: Use an alertable wait in rpcrt4_protseq_np_wait_for_new_connection to…

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.
parent 83a02c54
......@@ -605,7 +605,15 @@ static int rpcrt4_protseq_np_wait_for_new_connection(RpcServerProtseq *protseq,
if (!objs)
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)
return 0;
else if (res == WAIT_FAILED)
......
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