]> granicus.if.org Git - postgis/commitdiff
#3405 Memory leak in lwgeom_to_points
authorPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 6 Sep 2017 18:29:41 +0000 (18:29 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 6 Sep 2017 18:29:41 +0000 (18:29 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@15640 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwgeom_geos.c

index 8d84ed51939d50a267c2df3ef99e83cac45be188..4a4cdd014ec37da156e5bfd8f91b9ae46a848bf2 100644 (file)
@@ -1882,6 +1882,7 @@ lwmpoly_to_points(const LWMPOLY *lwmpoly, int npoints)
                                }
                                /* Just free the shell, leave the underlying lwpoints alone, as they
                                   are now owed by the returning multipoint */
+                               lwfree(sub_mpt->geoms);
                                lwgeom_release((LWGEOM*)sub_mpt);
                        }
                }