From: Björn Harrtell Date: Sun, 5 Mar 2017 11:58:54 +0000 (+0000) Subject: Clone LWGEOM in aggregation step X-Git-Tag: 2.4.0alpha~162 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5a2a4acad3434db582122d86c11b4351426ba887;p=postgis Clone LWGEOM in aggregation step References #3720 git-svn-id: http://svn.osgeo.org/postgis/trunk@15321 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis/geobuf.c b/postgis/geobuf.c index b0c4b3242..e9f9aa1b2 100644 --- a/postgis/geobuf.c +++ b/postgis/geobuf.c @@ -540,7 +540,7 @@ void geobuf_agg_transfn(struct geobuf_agg_context *ctx) if (!datum) lwerror("geobuf_agg_transfn: geometry column cannot be null"); gs = (GSERIALIZED *) PG_DETOAST_DATUM(datum); - lwgeom = lwgeom_from_gserialized(gs); + lwgeom = lwgeom_clone_deep(lwgeom_from_gserialized(gs)); feature = encode_feature(ctx);