[PATCH] ddraw: Avoid leaking references to the wined3d device.
zfigura at codeweavers.com
Tue Aug 21 15:01:40 CDT 2018
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
The ddraw surfaces associated with backbuffers take a reference to the
wined3d device, but this was never released.
This patch was all but written by Henri Verbeet.
dlls/ddraw/surface.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index cb837b1..cf09f9c 100644
@@ -527,7 +527,16 @@ static void ddraw_surface_cleanup(struct ddraw_surface *surface)
surf = surface->complex_array[i];
surface->complex_array[i] = NULL;
+ struct ddraw_texture *texture = wined3d_texture_get_parent(surf->wined3d_texture);
+ struct wined3d_device *wined3d_device = texture->wined3d_device;
+ struct ddraw_surface *root = texture->root;
+ if (surf == root)
More information about the wine-devel