From 7c57461d299620f2e0fa3b9f02bdbe910de41e75 Mon Sep 17 00:00:00 2001 From: Alex Henrie Date: Fri, 1 Jun 2018 07:15:44 -0600 Subject: [PATCH] gdi32: Fix memory leak on error in PATH_WidenPath (Coverity). Signed-off-by: Alex Henrie Signed-off-by: Huw Davies Signed-off-by: Alexandre Julliard --- dlls/gdi32/path.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/gdi32/path.c b/dlls/gdi32/path.c index 41cab60515e..49e270c4fe8 100644 --- a/dlls/gdi32/path.c +++ b/dlls/gdi32/path.c @@ -1749,6 +1749,9 @@ static struct gdi_path *PATH_WidenPath(DC *dc) break; default: ERR("Got path flag %c\n", flat_path->flags[i]); + for(i = 0; i < numStrokes; i++) free_gdi_path(pStrokes[i]); + HeapFree(GetProcessHeap(), 0, pStrokes); + free_gdi_path(flat_path); return NULL; } } -- 2.11.4.GIT