From 688d7a58f4d3d9c1d68aeb5a74b72ce7c82ede00 Mon Sep 17 00:00:00 2001 From: Cristy Date: Mon, 12 Mar 2018 20:47:25 -0400 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6847 --- MagickCore/draw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MagickCore/draw.c b/MagickCore/draw.c index 3ce289e8b..7417ab858 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -4968,12 +4968,13 @@ static MagickBooleanType DrawStrokePolygon(Image *image, if (stroke_polygon == (PrimitiveInfo *) NULL) { status=0; + stroke_polygon=(PrimitiveInfo *) RelinquishMagickMemory(stroke_polygon); break; } status&=DrawPolygonPrimitive(image,clone_info,stroke_polygon,exception); + stroke_polygon=(PrimitiveInfo *) RelinquishMagickMemory(stroke_polygon); if (status == 0) break; - stroke_polygon=(PrimitiveInfo *) RelinquishMagickMemory(stroke_polygon); q=p+p->coordinates-1; closed_path=(fabs(q->point.x-p->point.x) < DrawEpsilon) && (fabs(q->point.y-p->point.y) < DrawEpsilon) ? MagickTrue : MagickFalse; -- 2.40.0