]> granicus.if.org Git - postgis/commitdiff
Do not leak a serialized geometry
authorSandro Santilli <strk@keybit.net>
Tue, 31 May 2016 07:58:21 +0000 (07:58 +0000)
committerSandro Santilli <strk@keybit.net>
Tue, 31 May 2016 07:58:21 +0000 (07:58 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@14925 b70326c6-7e19-0410-871a-916f4a2858ee

topology/postgis_topology.c

index 13fd5f394dd1640f695f21da59d48f167305261d..d1d3242f6054c323821641d8dc8e004e5a363a4a 100644 (file)
@@ -2449,6 +2449,7 @@ cb_getFaceContainingPoint( const LWT_BE_TOPOLOGY* topo, const LWPOINT* pt )
   spi_result = SPI_execute_with_args(sql->data, 1, argtypes, values, NULL,
                                      !topo->be_data->data_changed, 1);
   MemoryContextSwitchTo( oldcontext ); /* switch back */
+  pfree(pts); /* not needed anymore */
   if ( spi_result != SPI_OK_SELECT ) {
                cberror(topo->be_data, "unexpected return (%d) from query execution: %s",
             spi_result, sql->data);