[PATCH v2] gdi32: Fix memory leak on error in PATH_WidenPath (Coverity)
Alex Henrie
alexhenrie24 at gmail.com
Fri Jun 1 08:15:44 CDT 2018
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
v2: Also free the paths in pStrokes
dlls/gdi32/path.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/gdi32/path.c b/dlls/gdi32/path.c
index 41cab60515..49e270c4fe 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.17.0
More information about the wine-devel
mailing list