[postgis-devel] Create a new data type for PostGIS in C

Sandro Santilli strk at kbt.io
Sun Aug 20 07:07:35 PDT 2017


On Thu, Aug 17, 2017 at 05:47:06PM +0000, Fabiana Zioti wrote:

>   int32 id = PG_GETARG_INT32(0);
[..]
>   GSERIALIZED *geom = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(2));

[...]
>   PG_FREE_IF_COPY(geom, 0);

You're freeing argument 0, which is an INT32, rather
than the geometry argument which is 2

--strk;



More information about the postgis-devel mailing list