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

git at osgeo.org git at osgeo.org
Fri Nov 13 18:14:39 PST 2020


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  7dc03c1a9f7046563e3890dfc1b265e0bd551dd5 (commit)
      from  c19dbdb370f3f5fb535ef4c7515ae42e94c38f6d (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 7dc03c1a9f7046563e3890dfc1b265e0bd551dd5
Author: Daniel Baston <dbaston at gmail.com>
Date:   Fri Nov 13 21:13:32 2020 -0500

    Fix some memory leaks in tests

diff --git a/tests/unit/capi/GEOSDistanceTest.cpp b/tests/unit/capi/GEOSDistanceTest.cpp
index 30051c4..a71b6f0 100644
--- a/tests/unit/capi/GEOSDistanceTest.cpp
+++ b/tests/unit/capi/GEOSDistanceTest.cpp
@@ -145,6 +145,9 @@ void object::test<3>
     int status = GEOSDistance(g1, g2, &d);
 
     ensure_equals(status, 1);
+
+    GEOSGeom_destroy(g1);
+    GEOSGeom_destroy(g2);
 }
 
 } // namespace tut
diff --git a/tests/unit/capi/capi_test_utils.h b/tests/unit/capi/capi_test_utils.h
index 0f20a0b..7ce6312 100644
--- a/tests/unit/capi/capi_test_utils.h
+++ b/tests/unit/capi/capi_test_utils.h
@@ -77,6 +77,7 @@ namespace capitest {
                 GEOSFree(wkt1);
                 GEOSFree(wkt2);
             }
+            GEOSGeom_destroy(g2);
             tut::ensure_equals("GEOSEqualsExact(g1, g2, 1e-12)", rslt, 1);
             return;
         }

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

Summary of changes:
 tests/unit/capi/GEOSDistanceTest.cpp | 3 +++
 tests/unit/capi/capi_test_utils.h    | 1 +
 2 files changed, 4 insertions(+)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list