[geos-commits] r2417 - trunk/tests/unit/capi
svn_geos at osgeo.org
svn_geos at osgeo.org
Mon Apr 27 15:47:22 EDT 2009
Author: strk
Date: 2009-04-27 15:47:20 -0400 (Mon, 27 Apr 2009)
New Revision: 2417
Modified:
trunk/tests/unit/capi/GEOSGeomToWKTTest.cpp
Log:
Plug last one. All heap blocks were freed -- no leaks are possible.
Modified: trunk/tests/unit/capi/GEOSGeomToWKTTest.cpp
===================================================================
--- trunk/tests/unit/capi/GEOSGeomToWKTTest.cpp 2009-04-27 19:42:25 UTC (rev 2416)
+++ trunk/tests/unit/capi/GEOSGeomToWKTTest.cpp 2009-04-27 19:47:20 UTC (rev 2417)
@@ -53,7 +53,9 @@
geom1_ = GEOSGeomFromWKT(wkt.c_str());
ensure ( 0 != geom1_ );
- std::string out(GEOSGeomToWKT(geom1_));
+ char* wkt_c = GEOSGeomToWKT(geom1_);
+ std::string out(wkt_c);
+ free(wkt_c);
ensure_equals(out, wkt);
}
@@ -63,7 +65,9 @@
geom1_ = GEOSGeomFromWKT(wkt.c_str());
ensure ( 0 != geom1_ );
- std::string out(GEOSGeomToWKT(geom1_));
+ char* wkt_c = GEOSGeomToWKT(geom1_);
+ std::string out(wkt_c);
+ free(wkt_c);
ensure_equals(out.substr(0, n), wkt.substr(0, n));
}
More information about the geos-commits
mailing list