Module: wine Branch: stable Commit: 0ead54c80ee9d596a9799ab6e9d4035765f6369a URL: https://source.winehq.org/git/wine.git/?a=commit;h=0ead54c80ee9d596a9799ab6e...
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 (cherry picked from commit 40ce1dd473e706a00456b8d1c7bc3e802810a97e) Signed-off-by: Michael Stefaniuc mstefani@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 06fb89e..4aa8831 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -1064,7 +1064,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,