winemac: Fix leaks in macdrv_surface_destroy.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2020-03-04 18:22:23 +01:00 committed by Alexandre Julliard
parent 43f608851f
commit c4becb85f1
1 changed files with 3 additions and 0 deletions

View File

@ -208,6 +208,9 @@ static void macdrv_surface_destroy(struct window_surface *window_surface)
struct macdrv_window_surface *surface = get_mac_surface(window_surface);
TRACE("freeing %p bits %p\n", surface, surface->bits);
if (surface->region) DeleteObject(surface->region);
if (surface->drawn) DeleteObject(surface->drawn);
HeapFree(GetProcessHeap(), 0, surface->blit_data);
HeapFree(GetProcessHeap(), 0, surface->bits);
pthread_mutex_destroy(&surface->mutex);
HeapFree(GetProcessHeap(), 0, surface);