mirror of
https://git.osgeo.org/gitea/postgis/postgis
synced 2024-10-23 16:42:35 +00:00
Plugged memory leaks in Polygonize().
git-svn-id: http://svn.osgeo.org/postgis/trunk@2155 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
parent
e19fc98d93
commit
08b5213a11
3
CHANGES
3
CHANGES
|
@ -31,6 +31,9 @@ PostGIS 1.1.0CVS
|
|||
- SnapToGrid doesn't discard higher dimensions
|
||||
- NEW SnapToGrid(geometry, point offset, xsize, ysize, zsize, msize)
|
||||
|
||||
PostGIS 1.0.7CVS
|
||||
- Fixed memory leak in polygonize()
|
||||
|
||||
PostGIS 1.0.6
|
||||
2005/12/06
|
||||
- Fixed palloc(0) call in collection deserializer (only gives
|
||||
|
|
|
@ -2629,7 +2629,9 @@ Datum polygonize_garray(PG_FUNCTION_ARGS)
|
|||
#ifdef PGIS_DEBUG
|
||||
elog(NOTICE, "polygonize_garray: GEOSpolygonize returned");
|
||||
#endif
|
||||
//pfree(vgeoms);
|
||||
for (i=0; i<nelems; ++i) GEOSdeleteGeometry(vgeoms[i]);
|
||||
pfree(vgeoms);
|
||||
|
||||
if ( ! geos_result ) PG_RETURN_NULL();
|
||||
|
||||
GEOSSetSRID(geos_result, SRID);
|
||||
|
|
|
@ -2645,7 +2645,9 @@ Datum polygonize_garray(PG_FUNCTION_ARGS)
|
|||
#ifdef PGIS_DEBUG
|
||||
elog(NOTICE, "polygonize_garray: GEOSpolygonize returned");
|
||||
#endif
|
||||
//pfree(vgeoms);
|
||||
for (i=0; i<nelems; ++i) GEOSGeom_destroy(vgeoms[i]);
|
||||
pfree(vgeoms);
|
||||
|
||||
if ( ! geos_result ) PG_RETURN_NULL();
|
||||
|
||||
GEOSSetSRID(geos_result, SRID);
|
||||
|
|
|
@ -1770,6 +1770,7 @@ bool
|
|||
GEOSHasZ(Geometry *g)
|
||||
{
|
||||
//char msg[256];
|
||||
if ( g->isEmpty() ) return false;
|
||||
double az = g->getCoordinate()->z;
|
||||
//sprintf(msg, "ZCoord: %g", az);
|
||||
//NOTICE_MESSAGE(msg);
|
||||
|
|
Loading…
Reference in a new issue