From: Paul Ramsey Date: Wed, 7 Jan 2009 01:16:40 +0000 (+0000) Subject: Remove memory leak in standard loader. X-Git-Tag: 1.4.0b1~339 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f59409b80b20ab202851c8b132e7585d9070ec1a;p=postgis Remove memory leak in standard loader. git-svn-id: http://svn.osgeo.org/postgis/trunk@3495 b70326c6-7e19-0410-871a-916f4a2858ee --- 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) {