From d929b43f5dc8c961abead05f05df5de1a5766c43 Mon Sep 17 00:00:00 2001 From: "Emden R. Gansner" Date: Tue, 6 Feb 2018 13:01:13 -0500 Subject: [PATCH] Fix bug in routespl, when the code encounters a degenerate case when trying to reclaim space and thus calls make_polyline. The old code freed the array of points returned, but this array is static in make_polyline and should never be freed. --- lib/common/routespl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/common/routespl.c b/lib/common/routespl.c index 4511e449b..a5c7076c1 100644 --- a/lib/common/routespl.c +++ b/lib/common/routespl.c @@ -634,7 +634,6 @@ static pointf *_routesplines(path * pp, int *npoints, int polyline) agerr(AGWARN, "Unable to reclaim box space in spline routing for edge \"%s\" -> \"%s\". Something is probably seriously wrong.\n", agnameof(agtail(realedge)), agnameof(aghead(realedge))); make_polyline (pl, &polyspl); limitBoxes (boxes, boxn, polyspl.ps, polyspl.pn, INIT_DELTA); - free (polyspl.ps); } *npoints = spl.pn; -- 2.40.0