Zhiyi Zhang : gdiplus: Fix a memory leak.
Alexandre Julliard
julliard at winehq.org
Thu Sep 13 03:49:17 CDT 2018
Module: wine
Branch: stable
Commit: 0ead54c80ee9d596a9799ab6e9d4035765f6369a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=0ead54c80ee9d596a9799ab6e9d4035765f6369a
Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date: Mon Jun 18 22:00:09 2018 +0800
gdiplus: Fix a memory leak.
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 40ce1dd473e706a00456b8d1c7bc3e802810a97e)
Signed-off-by: Michael Stefaniuc <mstefani at 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,
More information about the wine-cvs
mailing list