[postgis-commits] svn - r3495 - trunk/loader

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Tue Jan 6 17:16:40 PST 2009


Author: pramsey
Date: 2009-01-06 17:16:40 -0800 (Tue, 06 Jan 2009)
New Revision: 3495

Modified:
   trunk/loader/shp2pgsql.c
Log:
Remove memory leak in standard loader.


Modified: trunk/loader/shp2pgsql.c
===================================================================
--- trunk/loader/shp2pgsql.c	2009-01-05 20:54:12 UTC (rev 3494)
+++ trunk/loader/shp2pgsql.c	2009-01-07 01:16:40 UTC (rev 3495)
@@ -1054,6 +1054,7 @@
 			free(temp);
 		}
 	}
+	free(polys);
 }
 
 /*This function basically deals with the polygon case. */
@@ -1160,6 +1161,8 @@
 		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)
 	{



More information about the postgis-commits mailing list