Module: wine Branch: master Commit: e22e34ecf4db9e2959f67b5fb9ae9e11c61d3cd4 URL: https://source.winehq.org/git/wine.git/?a=commit;h=e22e34ecf4db9e2959f67b5fb...
Author: Zebediah Figura zfigura@codeweavers.com Date: Thu Oct 21 12:41:12 2021 -0500
quartz: Avoid accessing the advise_sink structure after it is queued.
It could already have been removed and freed.
Signed-off-by: Zebediah Figura zfigura@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/quartz/systemclock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/quartz/systemclock.c b/dlls/quartz/systemclock.c index 56ad217c76a..f579ae754ea 100644 --- a/dlls/quartz/systemclock.c +++ b/dlls/quartz/systemclock.c @@ -206,6 +206,7 @@ static HRESULT add_sink(struct system_clock *clock, DWORD_PTR handle, sink->due_time = due_time; sink->period = period; sink->cookie = InterlockedIncrement(&cookie_counter); + *cookie = sink->cookie;
EnterCriticalSection(&clock->cs); list_add_tail(&clock->sinks, &sink->entry); @@ -217,7 +218,6 @@ static HRESULT add_sink(struct system_clock *clock, DWORD_PTR handle, } WakeConditionVariable(&clock->cv);
- *cookie = sink->cookie; return S_OK; }