gdiplus: Fix leak in SOFTWARE_GdipDrawDriverString.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f65cca4de3)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
stable
Piotr Caban 2020-03-05 16:04:31 +01:00 committed by Michael Stefaniuc
parent 3b2dc114fb
commit 37a1205885
1 changed files with 5 additions and 0 deletions

View File

@ -7215,8 +7215,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));