]> granicus.if.org Git - postgis/commitdiff
Fix #258: ST_HausdorffDistance crashes server. Another geometry free typo (same as...
authorMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Tue, 6 Oct 2009 13:51:18 +0000 (13:51 +0000)
committerMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Tue, 6 Oct 2009 13:51:18 +0000 (13:51 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@4610 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/lwgeom_geos.c

index bb5e9c6404566fe0a47f6acf0682af96b7ca54c9..3aab75fdc370875c16234d1640c32694deefc809 100644 (file)
@@ -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);
 }