[PATCH] gdiplus: free dash_pattern_scaled (Coverity)
Marcus Meissner
marcus at jet.franken.de
Sun Jul 23 15:25:19 CDT 2017
1414713 Resource leak
Signed-off-by: Marcus Meissner <marcus at jet.franken.de>
---
dlls/gdiplus/graphicspath.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c
index 05c7982566..8b13fc5b2a 100644
--- a/dlls/gdiplus/graphicspath.c
+++ b/dlls/gdiplus/graphicspath.c
@@ -2109,7 +2109,10 @@ static void widen_dashed_figure(GpPath *path, GpPen *pen, int start, int end,
dash_pattern_scaled[i] = pen->width * dash_pattern[i];
tmp_points = heap_alloc_zero((end - start + 2) * sizeof(GpPoint));
- if (!tmp_points) return; /* FIXME */
+ if (!tmp_points) {
+ heap_free(dash_pattern_scaled);
+ return; /* FIXME */
+ }
if (!closed)
draw_start_cap = 1;
--
2.13.3
More information about the wine-patches
mailing list