From f59409b80b20ab202851c8b132e7585d9070ec1a Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Wed, 7 Jan 2009 01:16:40 +0000 Subject: [PATCH] Remove memory leak in standard loader. git-svn-id: http://svn.osgeo.org/postgis/trunk@3495 b70326c6-7e19-0410-871a-916f4a2858ee --- loader/shp2pgsql.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/loader/shp2pgsql.c b/loader/shp2pgsql.c index b9fa90074..d9be03dba 100644 --- a/loader/shp2pgsql.c +++ b/loader/shp2pgsql.c @@ -1054,6 +1054,7 @@ ReleasePolygons(Ring **polys, int npolys) free(temp); } } + free(polys); } /*This function basically deals with the polygon case. */ @@ -1160,6 +1161,8 @@ InsertPolygon(void) lwpolygons[pi] = lwpoly_as_lwgeom(lwpoly); } + ReleasePolygons(Outer, polygon_total); + /* If using MULTIPOLYGONS then generate the serialized collection, otherwise just a single POLYGON */ if (simple_geometries == 0) { -- 2.49.0