Piotr Caban : gdiplus: Fix leak in SOFTWARE_GdipDrawDriverString.
Alexandre Julliard
julliard at winehq.org
Thu Mar 5 16:35:26 CST 2020
Module: wine
Branch: master
Commit: f65cca4de3f6a97f0c3f6837036864719e714520
URL: https://source.winehq.org/git/wine.git/?a=commit;h=f65cca4de3f6a97f0c3f6837036864719e714520
Author: Piotr Caban <piotr at codeweavers.com>
Date: Thu Mar 5 16:04:31 2020 +0100
gdiplus: Fix leak in SOFTWARE_GdipDrawDriverString.
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/gdiplus/graphics.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index cfcbd56d34..0b6e4ec377 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -7224,8 +7224,13 @@ static GpStatus SOFTWARE_GdipDrawDriverString(GpGraphics *graphics, GDIPCONST UI
}
if (max_glyphsize == 0)
+ {
/* Nothing to draw. */
+ heap_free(pti);
+ DeleteDC(hdc);
+ DeleteObject(hfont);
return Ok;
+ }
glyph_mask = heap_alloc_zero(max_glyphsize);
text_mask = heap_alloc_zero((max_x - min_x) * (max_y - min_y));
More information about the wine-cvs
mailing list