[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0alpha2-50-gd1735b1

git at osgeo.org git at osgeo.org
Thu Aug 13 12:56:17 PDT 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 "PostGIS".

The branch, master has been updated
       via  d1735b10d59ffedff43b939f4e7e7fafd1138259 (commit)
      from  2a3fc226db433850fc3dc967cf2501b79f083dfa (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 d1735b10d59ffedff43b939f4e7e7fafd1138259
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Thu Aug 13 12:56:13 2020 -0700

    remove memory leak in test

diff --git a/liblwgeom/cunit/cu_split.c b/liblwgeom/cunit/cu_split.c
index 3bee364..714ea75 100644
--- a/liblwgeom/cunit/cu_split.c
+++ b/liblwgeom/cunit/cu_split.c
@@ -80,7 +80,7 @@ static void test_lwline_split_by_point_to(void)
 
 static void test_lwgeom_split(void)
 {
-	LWGEOM *geom, *blade, *ret;
+	LWGEOM *geom, *blade, *ret, *tmp1, *tmp2;
 	char *wkt, *in_wkt;
 
 	geom = lwgeom_from_wkt("MULTILINESTRING((-5 -2,0 0),(0 0,10 10))", LW_PARSER_CHECK_NONE);
@@ -132,11 +132,14 @@ static void test_lwgeom_split(void)
 	ret = lwgeom_normalize(lwgeom_split(geom, blade));
 	CU_ASSERT(ret != NULL);
 	wkt = lwgeom_to_ewkt(ret);
-	in_wkt = lwgeom_to_ewkt(lwgeom_normalize(lwgeom_from_wkt(
+	tmp1 = lwgeom_normalize(lwgeom_from_wkt(
 	    "SRID=1;GEOMETRYCOLLECTION(POLYGON((7 1,0 1,0 10,7 10,7 1)),POLYGON((7 10,10 10,10 1,7 1,7 10)))",
-	    LW_PARSER_CHECK_NONE)));
+	    LW_PARSER_CHECK_NONE));
+	in_wkt = lwgeom_to_ewkt(tmp1);
 	ASSERT_STRING_EQUAL(wkt, in_wkt);
 	lwfree(wkt);
+	lwfree(in_wkt);
+	lwgeom_free(tmp1);
 	lwgeom_free(ret);
 	lwgeom_free(geom);
 	lwgeom_free(blade);

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

Summary of changes:
 liblwgeom/cunit/cu_split.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list