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>
feature/deterministic
Piotr Caban 2020-03-05 16:04:31 +01:00 committed by Alexandre Julliard
parent c74d909e3b
commit f65cca4de3
1 changed files with 5 additions and 0 deletions

View File

@ -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));