[geos-commits] [SCM] GEOS branch main updated. 97511f8e3ce27317e3a311b894f3ca2d03364f46

git at osgeo.org git at osgeo.org
Thu Oct 21 03:21:52 PDT 2021


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, main has been updated
       via  97511f8e3ce27317e3a311b894f3ca2d03364f46 (commit)
      from  fb6d9ea20003e8db38ed5f6cac53bab18f333c9f (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 97511f8e3ce27317e3a311b894f3ca2d03364f46
Author: Daniel Baston <dbaston at gmail.com>
Date:   Thu Oct 21 06:21:39 2021 -0400

    Fix memory leak in unit test

diff --git a/tests/unit/capi/GEOSRelateTest.cpp b/tests/unit/capi/GEOSRelateTest.cpp
index 7da699b17..336c41f1e 100644
--- a/tests/unit/capi/GEOSRelateTest.cpp
+++ b/tests/unit/capi/GEOSRelateTest.cpp
@@ -25,8 +25,9 @@ void object::test<1>()
     geom2_ = fromWKT("LINESTRING(5 6, 7 8)");
     ensure(nullptr != geom2_);
 
-
-    ensure_equals(std::string{"FF1FF0102"}, GEOSRelate(geom1_, geom2_));
+    char* pattern = GEOSRelate(geom1_, geom2_);
+    ensure_equals(std::string{"FF1FF0102"}, pattern);
+    GEOSFree(pattern);
 }
 
 } // namespace tut

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

Summary of changes:
 tests/unit/capi/GEOSRelateTest.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list