Module: wine Branch: master Commit: b67bbb732be82dedee93c88cf92c92c0540f3514 URL: https://source.winehq.org/git/wine.git/?a=commit;h=b67bbb732be82dedee93c88cf...
Author: Piotr Caban piotr@codeweavers.com Date: Sun Sep 20 15:58:54 2020 +0200
server: Don't create wait object if infinite timeout is passed to NtSetTimer.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49847 Signed-off-by: Piotr Caban piotr@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
server/timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/server/timer.c b/server/timer.c index 6460acbf51..469f9d5a90 100644 --- a/server/timer.c +++ b/server/timer.c @@ -177,7 +177,8 @@ static int set_timer( struct timer *timer, timeout_t expire, unsigned int period timer->callback = callback; timer->arg = arg; if (callback) timer->thread = (struct thread *)grab_object( current ); - timer->timeout = add_timeout_user( expire, timer_callback, timer ); + if (expire != TIMEOUT_INFINITE) + timer->timeout = add_timeout_user( expire, timer_callback, timer ); return signaled; }