Module: wine Branch: master Commit: 40ce1dd473e706a00456b8d1c7bc3e802810a97e URL: https://source.winehq.org/git/wine.git/?a=commit;h=40ce1dd473e706a00456b8d1c...
Author: Zhiyi Zhang zzhang@codeweavers.com Date: Mon Jun 18 22:00:09 2018 +0800
gdiplus: Fix a memory leak.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com Signed-off-by: Vincent Povirk vincent@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/gdiplus/graphics.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 76aabe7..894e879 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -1069,7 +1069,11 @@ static void brush_fill_path(GpGraphics *graphics, GpBrush* brush) { HDC hdc = CreateCompatibleDC(NULL);
- if (!hdc) break; + if (!hdc) + { + DeleteObject(bmp); + break; + }
SelectObject(hdc, bmp); gdi_alpha_blend(graphics, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top,