[geos-commits] [SCM] GEOS branch master updated. 7dd3d0b243b30c69e4ac425bb76fa9dd731389e0

git at osgeo.org git at osgeo.org
Mon Nov 19 17:30:09 PST 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GEOS".

The branch, master has been updated
       via  7dd3d0b243b30c69e4ac425bb76fa9dd731389e0 (commit)
      from  f6a0efd1f243f7edd6dec5e346e57f4f7a1fc17d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7dd3d0b243b30c69e4ac425bb76fa9dd731389e0
Author: Daniel Baston <dbaston at gmail.com>
Date:   Mon Nov 19 20:30:01 2018 -0500

    Fix memory leak introduced in aefa49cbc

diff --git a/src/operation/overlay/OverlayOp.cpp b/src/operation/overlay/OverlayOp.cpp
index 56ed803..2f7ed87 100644
--- a/src/operation/overlay/OverlayOp.cpp
+++ b/src/operation/overlay/OverlayOp.cpp
@@ -700,7 +700,7 @@ OverlayOp::computeGeometry(vector<Point*> *nResultPointList,
 	size_t nLines=nResultLineList->size();
 	size_t nPolys=nResultPolyList->size();
 
-	vector<Geometry*> *geomList=new vector<Geometry*>();
+	std::unique_ptr<vector<Geometry*>> geomList{new vector<Geometry*>()};
 	geomList->reserve(nPoints+nLines+nPolys);
 
 	// element geometries of the result are always in the order P,L,A
@@ -723,7 +723,7 @@ OverlayOp::computeGeometry(vector<Point*> *nResultPointList,
 		                         arg[1]->getGeometry(), geomFact);
 	}
 	// build the most specific geometry possible
-	Geometry *g=geomFact->buildGeometry(geomList);
+	Geometry *g=geomFact->buildGeometry(geomList.release());
 	return g;
 }
 

-----------------------------------------------------------------------

Summary of changes:
 src/operation/overlay/OverlayOp.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list