fix memory leak in Geom.Bounds

GEOS envelope geometry was not destroyed when calculating the boundary.
This leak was triggered with mappings with webmerc_area and imports
with -limitto. (closes #139)
master
Oliver Tonnhofer 2017-03-03 09:12:15 +01:00
parent dbc9deb913
commit fb7d574d9e
1 changed files with 1 additions and 0 deletions

View File

@ -322,6 +322,7 @@ func (this *Geom) Bounds() Bounds {
if geom == nil {
return NilBounds
}
defer C.GEOSGeom_destroy(geom)
extRing := C.GEOSGetExteriorRing(geom)
if extRing == nil {
return NilBounds