From d1e1512b8ac91c8a8e0a576997159771cfa3f35f Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Mon, 29 Jun 2015 17:44:37 +0000 Subject: [PATCH] Remove memory leak git-svn-id: http://svn.osgeo.org/postgis/trunk@13749 b70326c6-7e19-0410-871a-916f4a2858ee --- liblwgeom/lwlinearreferencing.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/liblwgeom/lwlinearreferencing.c b/liblwgeom/lwlinearreferencing.c index a3dbe068d..3ff32246d 100644 --- a/liblwgeom/lwlinearreferencing.c +++ b/liblwgeom/lwlinearreferencing.c @@ -1134,16 +1134,19 @@ lwgeom_tcpa(const LWGEOM *g1, const LWGEOM *g2, double *mindist) { if ( -1 == ptarray_locate_along_linear(l1->points, t0, &p0, 0) ) { + lwfree(mvals); lwerror("Could not find point with M=%g on first geom", t0); return -1; } if ( -1 == ptarray_locate_along_linear(l2->points, t0, &p1, 0) ) { + lwfree(mvals); lwerror("Could not find point with M=%g on second geom", t0); return -1; } *mindist = distance3d_pt_pt((POINT3D*)&p0, (POINT3D*)&p1); } + lwfree(mvals); return t0; }} -- 2.50.1