]> granicus.if.org Git - postgis/commitdiff
Early release lwgeom memory
authorSandro Santilli <strk@keybit.net>
Thu, 29 Nov 2012 18:01:49 +0000 (18:01 +0000)
committerSandro Santilli <strk@keybit.net>
Thu, 29 Nov 2012 18:01:49 +0000 (18:01 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10754 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/lwgeom_geos.c

index 333fadaf16c78562901fd5fb006d7b4e4daeb494..758e9c4ab6eebfda56d9a992e80f4b4bd77690a4 100644 (file)
@@ -1559,6 +1559,7 @@ Datum centroid(PG_FUNCTION_ARGS)
        {
                lwg = lwpoint_construct_empty(gserialized_get_srid(geom), gserialized_has_z(geom), gserialized_has_m(geom));
                result = geometry_serialize(lwpoint_as_lwgeom(lwg));
+               lwgeom_free(lwg);
                PG_RETURN_POINTER(result);
        }