Signed-off-by: Sven Baars sbaars@codeweavers.com --- dlls/gdi32/path.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/gdi32/path.c b/dlls/gdi32/path.c index 618a050a139..a82b34908e1 100644 --- a/dlls/gdi32/path.c +++ b/dlls/gdi32/path.c @@ -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: