From: Sandro Santilli Date: Mon, 4 Jul 2011 13:56:04 +0000 (+0000) Subject: Do not deep-free return from lwcollection_homogenize as it doesn't copy POINTARRAY... X-Git-Tag: 2.0.0alpha1~1263 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=71b1b8c46579b741e9fb1f4ca652a5ecc043d17a;p=postgis Do not deep-free return from lwcollection_homogenize as it doesn't copy POINTARRAY memory. See #1104. git-svn-id: http://svn.osgeo.org/postgis/trunk@7579 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/cunit/cu_homogenize.c b/liblwgeom/cunit/cu_homogenize.c index bd5d2839a..411c6ac0c 100644 --- a/liblwgeom/cunit/cu_homogenize.c +++ b/liblwgeom/cunit/cu_homogenize.c @@ -44,12 +44,11 @@ static void do_coll_test(char * in, char * out) if (strcmp(tmp, out)) fprintf(stderr, "\nIn: %s\nOut: %s\nTheo: %s\n", in, tmp, out); - lwfree(tmp); - tmp = lwgeom_to_ewkt(h, PARSER_CHECK_NONE); CU_ASSERT_STRING_EQUAL(tmp, out); lwfree(tmp); lwgeom_free(g); - lwgeom_free(h); + /* See http://trac.osgeo.org/postgis/ticket/1104 */ + lwgeom_release(h); }