gdi32: Fix a leak on error path (Coverity).

Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sven Baars 2021-04-18 14:30:25 +02:00 committed by Alexandre Julliard
parent 9cd6568062
commit bdfc865014

View file

@ -1729,7 +1729,11 @@ static struct gdi_path *PATH_WidenPath(DC *dc)
pStrokes = HeapAlloc(GetProcessHeap(), 0, sizeof(*pStrokes));
else
pStrokes = HeapReAlloc(GetProcessHeap(), 0, pStrokes, numStrokes * sizeof(*pStrokes));
if(!pStrokes) return NULL;
if(!pStrokes)
{
free_gdi_path(flat_path);
return NULL;
}
pStrokes[numStrokes - 1] = alloc_gdi_path(0);
/* fall through */
case PT_LINETO: