Module: wine Branch: master Commit: a172cc6c6ea8f627e3c92c4c53639b8cf7c8ab84 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a172cc6c6ea8f627e3c92c4c53... Author: Marcus Meissner <marcus(a)jet.franken.de> Date: Sun Jul 23 22:25:19 2017 +0200 gdiplus: Free dash_pattern_scaled (Coverity). Signed-off-by: Marcus Meissner <marcus(a)jet.franken.de> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- 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 05c7982..8b13fc5 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;