[PATCH v3 2/2] qedit: Do not force the sample to be freed in SampleGrabber_callback().
Zebediah Figura
zfigura at codeweavers.com
Thu Jul 14 14:14:31 CDT 2022
From: Brendan McGrath <brendan at redmandi.com>
This patch removes a work around that causes a crash in Unravel Two.
There is a callback in Unravel Two that appears to add a reference to a
IMediaSample, which this workaround treats as a leak and releases. However, the
application also later releases the reference itself, causing a use-after-free.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51616
Signed-off-by: Brendan McGrath <brendan at redmandi.com>
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
dlls/qedit/samplegrabber.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c
index 9b9780e564a..cefb2f37078 100644
--- a/dlls/qedit/samplegrabber.c
+++ b/dlls/qedit/samplegrabber.c
@@ -164,9 +164,6 @@ static void SampleGrabber_callback(struct sample_grabber *This, IMediaSample *sa
if (ref)
{
ERR("(%p) Callback referenced sample %p by %lu\n", This, sample, ref);
- /* ugly as hell but some apps are sooo buggy */
- while (ref--)
- IMediaSample_Release(sample);
}
}
break;
--
2.36.1
More information about the wine-devel
mailing list