Piotr Caban : gdiplus: Fix leak in SOFTWARE_GdipDrawDriverString.
Module: wine Branch: master Commit: f65cca4de3f6a97f0c3f6837036864719e714520 URL: https://source.winehq.org/git/wine.git/?a=commit;h=f65cca4de3f6a97f0c3f68370... Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Mar 5 16:04:31 2020 +0100 gdiplus: Fix leak in SOFTWARE_GdipDrawDriverString. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)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));
participants (1)
-
Alexandre Julliard