[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0rc1-18-gd890e2c

git at osgeo.org git at osgeo.org
Mon Dec 21 03:35: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 "PostGIS".

The branch, master has been updated
       via  d890e2c6c7e91d414aff7750f732fd97492544cf (commit)
      from  591a307ae10391fce87253912c86e088d9eaff37 (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 d890e2c6c7e91d414aff7750f732fd97492544cf
Author: Sandro Santilli <strk at kbt.io>
Date:   Mon Dec 21 12:34:46 2020 +0100

    Do not free 0-allocated geoms vector for made-valid empty collections
    
    References #4814

diff --git a/liblwgeom/lwgeom_geos_clean.c b/liblwgeom/lwgeom_geos_clean.c
index 3714e63..878d91b 100644
--- a/liblwgeom/lwgeom_geos_clean.c
+++ b/liblwgeom/lwgeom_geos_clean.c
@@ -322,6 +322,8 @@ lwcollection_make_geos_friendly(LWCOLLECTION* g)
 	uint32_t i, new_ngeoms = 0;
 	LWCOLLECTION* ret;
 
+	if ( ! g->ngeoms ) return lwcollection_as_lwgeom(g);
+
 	/* enough space for all components */
 	new_geoms = lwalloc(sizeof(LWGEOM*) * g->ngeoms);
 

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

Summary of changes:
 liblwgeom/lwgeom_geos_clean.c | 2 ++
 1 file changed, 2 insertions(+)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list