From: Piotr Caban Subject: [PATCH 1/2] server: Don't create wait object if infinite timeout is passed to NtSetTimer. Message-Id: Date: Sun, 20 Sep 2020 15:58:54 +0200 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49847 Signed-off-by: Piotr Caban --- server/timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/timer.c b/server/timer.c index 6460acbf519..469f9d5a90b 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; }