Skip to content

Commit

Permalink
Fix bug in routespl, when the code encounters a degenerate case when …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
emden committed Feb 6, 2018
1 parent bd97cff commit d929b43
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/common/routespl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d929b43

Please sign in to comment.