Otherwise it will still be reachable from the queue which means use-after-free.
From: Yuxuan Shui yshui@codeweavers.com
Otherwise it will still be reachable from the queue which means use-after-free. --- dlls/amstream/ddrawstream.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/amstream/ddrawstream.c b/dlls/amstream/ddrawstream.c index 9df61bfe885..f8ab333975a 100644 --- a/dlls/amstream/ddrawstream.c +++ b/dlls/amstream/ddrawstream.c @@ -1832,6 +1832,9 @@ static ULONG WINAPI ddraw_sample_Release(IDirectDrawStreamSample *iface) { EnterCriticalSection(&sample->parent->cs);
+ if (sample->pending) + remove_queued_update(sample); + while (sample->media_sample_refcount) SleepConditionVariableCS(&sample->parent->allocator_cv, &sample->parent->cs, INFINITE);
This merge request was approved by Elizabeth Figura.