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
parent
dbc9deb913
commit
fb7d574d9e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue