[SCM] PostGIS branch stable-3.5 updated. 3.5.0-24-g94dfbcafd

git at osgeo.org git at osgeo.org
Thu Nov 7 08:05:45 PST 2024


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, stable-3.5 has been updated
       via  94dfbcafd5363c2ef37fc9d4a523e8c62ddc0c7f (commit)
       via  48f1d4ba0d08499fa4c88d7e97faea1b1b75b532 (commit)
      from  58d45d6ead34a17cd5c500ea009e77d3e72a51dd (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 94dfbcafd5363c2ef37fc9d4a523e8c62ddc0c7f
Author: Sandro Santilli <strk at kbt.io>
Date:   Thu Nov 7 16:36:57 2024 +0100

    Fix small leak of GEOSGeometry
    
    References #5808 comment:10

diff --git a/liblwgeom/topo/lwgeom_topo.c b/liblwgeom/topo/lwgeom_topo.c
index 64f2bb1bc..c4c1fc2e5 100644
--- a/liblwgeom/topo/lwgeom_topo.c
+++ b/liblwgeom/topo/lwgeom_topo.c
@@ -7181,9 +7181,9 @@ _lwt_AddLine(LWT_TOPOLOGY* topo, LWLINE* line, double tol, int* nedges,
         lwerror("GEOSDistanceIndexed error: %s", lwgeom_geos_errmsg);
         return NULL;
       }
+      GEOSGeom_destroy(edge_g);
       if ( dist && dist >= tol ) continue;
       nearby[nearbyindex++] = g;
-      GEOSGeom_destroy(edge_g);
     }}
     LWDEBUGF(1, "Found %d edges closer than tolerance (%g)", nearbyindex, tol);
     GEOSGeom_destroy(noded_g);

commit 48f1d4ba0d08499fa4c88d7e97faea1b1b75b532
Author: Sandro Santilli <strk at kbt.io>
Date:   Thu Nov 7 16:18:25 2024 +0100

    Simplify releasing of GEOS memory
    
    References #5808

diff --git a/liblwgeom/topo/lwgeom_topo.c b/liblwgeom/topo/lwgeom_topo.c
index 6cf6ccaec..64f2bb1bc 100644
--- a/liblwgeom/topo/lwgeom_topo.c
+++ b/liblwgeom/topo/lwgeom_topo.c
@@ -691,8 +691,8 @@ _lwt_CheckEdgeCrossing( LWT_TOPOLOGY* topo,
     /* check if the edge has a non-boundary-boundary intersection with our edge */
 
     relate = GEOSRelateBoundaryNodeRule(eegg, edgegg, 2);
+    GEOSGeom_destroy(eegg);
     if ( ! relate ) {
-      GEOSGeom_destroy(eegg);
       GEOSGeom_destroy(edgegg);
       _lwt_release_edges(edges, num_edges);
       lwerror("GEOSRelateBoundaryNodeRule error: %s", lwgeom_geos_errmsg);
@@ -704,7 +704,6 @@ _lwt_CheckEdgeCrossing( LWT_TOPOLOGY* topo,
     match = GEOSRelatePatternMatch(relate, "FF*F*****");
     if ( match ) {
       /* error or no interior intersection */
-      GEOSGeom_destroy(eegg);
       GEOSFree(relate);
       if ( match == 2 ) {
         _lwt_release_edges(edges, num_edges);
@@ -719,7 +718,6 @@ _lwt_CheckEdgeCrossing( LWT_TOPOLOGY* topo,
     if ( match ) {
       _lwt_release_edges(edges, num_edges);
       GEOSGeom_destroy(edgegg);
-      GEOSGeom_destroy(eegg);
       GEOSFree(relate);
       if ( match == 2 ) {
         lwerror("GEOSRelatePatternMatch error: %s", lwgeom_geos_errmsg);
@@ -734,7 +732,6 @@ _lwt_CheckEdgeCrossing( LWT_TOPOLOGY* topo,
     if ( match ) {
       _lwt_release_edges(edges, num_edges);
       GEOSGeom_destroy(edgegg);
-      GEOSGeom_destroy(eegg);
       GEOSFree(relate);
       if ( match == 2 ) {
         lwerror("GEOSRelatePatternMatch error: %s", lwgeom_geos_errmsg);
@@ -749,7 +746,6 @@ _lwt_CheckEdgeCrossing( LWT_TOPOLOGY* topo,
     if ( match ) {
       _lwt_release_edges(edges, num_edges);
       GEOSGeom_destroy(edgegg);
-      GEOSGeom_destroy(eegg);
       GEOSFree(relate);
       if ( match == 2 ) {
         lwerror("GEOSRelatePatternMatch error: %s", lwgeom_geos_errmsg);
@@ -764,7 +760,6 @@ _lwt_CheckEdgeCrossing( LWT_TOPOLOGY* topo,
     if ( match ) {
       _lwt_release_edges(edges, num_edges);
       GEOSGeom_destroy(edgegg);
-      GEOSGeom_destroy(eegg);
       GEOSFree(relate);
       if ( match == 2 ) {
         lwerror("GEOSRelatePatternMatch error: %s", lwgeom_geos_errmsg);
@@ -779,7 +774,6 @@ _lwt_CheckEdgeCrossing( LWT_TOPOLOGY* topo,
     if ( match ) {
       _lwt_release_edges(edges, num_edges);
       GEOSGeom_destroy(edgegg);
-      GEOSGeom_destroy(eegg);
       GEOSFree(relate);
       if ( match == 2 ) {
         lwerror("GEOSRelatePatternMatch error: %s", lwgeom_geos_errmsg);
@@ -792,7 +786,6 @@ _lwt_CheckEdgeCrossing( LWT_TOPOLOGY* topo,
     LWDEBUGF(2, "Edge %" LWTFMT_ELEMID " analisys completed, it does no harm", edge_id);
 
     GEOSFree(relate);
-    GEOSGeom_destroy(eegg);
   }
   LWDEBUGF(1, "No edge crossing detected among the %lu candidate edges", num_edges);
   if ( edges ) _lwt_release_edges(edges, num_edges);

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

Summary of changes:
 liblwgeom/topo/lwgeom_topo.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list