See http://postgis.refractions.net/pipermail/postgis-devel/2012-February/018336.html
git-svn-id: http://svn.osgeo.org/postgis/trunk@9095
b70326c6-7e19-0410-871a-
916f4a2858ee
lwgeom_out = lwgeom_split(lwgeom_in, lwblade_in);
lwgeom_free(lwgeom_in);
lwgeom_free(lwblade_in);
- PG_FREE_IF_COPY(in, 0);
PG_FREE_IF_COPY(blade_in, 1);
if ( ! lwgeom_out )
{
+ PG_FREE_IF_COPY(in, 0); /* possibly referenced by lwgeom_out */
PG_RETURN_NULL();
}
out = geometry_serialize(lwgeom_out);
lwgeom_free(lwgeom_out);
+ PG_FREE_IF_COPY(in, 0); /* possibly referenced by lwgeom_out */
PG_RETURN_POINTER(out);
}