From: Mark Cave-Ayland Date: Tue, 6 Oct 2009 13:51:18 +0000 (+0000) Subject: Fix #258: ST_HausdorffDistance crashes server. Another geometry free typo (same as... X-Git-Tag: 1.5.0b1~403 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=24312ab78addb13c66afe548d6a632b479b8fd85;p=postgis Fix #258: ST_HausdorffDistance crashes server. Another geometry free typo (same as #241) in both st_hausdorffdistance() and st_hausdorffdistancedensify(). git-svn-id: http://svn.osgeo.org/postgis/trunk@4610 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis/lwgeom_geos.c b/postgis/lwgeom_geos.c index bb5e9c640..3aab75fdc 100644 --- a/postgis/lwgeom_geos.c +++ b/postgis/lwgeom_geos.c @@ -132,7 +132,7 @@ Datum hausdorffdistance(PG_FUNCTION_ARGS) } PG_FREE_IF_COPY(geom1, 0); - PG_FREE_IF_COPY(geom2, 0); + PG_FREE_IF_COPY(geom2, 1); PG_RETURN_FLOAT8(result); } @@ -175,7 +175,7 @@ Datum hausdorffdistancedensify(PG_FUNCTION_ARGS) } PG_FREE_IF_COPY(geom1, 0); - PG_FREE_IF_COPY(geom2, 0); + PG_FREE_IF_COPY(geom2, 1); PG_RETURN_FLOAT8(result); }