]> granicus.if.org Git - postgis/commitdiff
Fix memory leak in lwgeom_split
authorSandro Santilli <strk@keybit.net>
Mon, 21 Nov 2011 14:59:30 +0000 (14:59 +0000)
committerSandro Santilli <strk@keybit.net>
Mon, 21 Nov 2011 14:59:30 +0000 (14:59 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8205 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwgeom_geos_split.c

index 03e131d6fe8b497d72ad0e2f1407fd774a5d98fb..33dcabea0d28f39593afec07882247be7c6eb7af 100644 (file)
@@ -428,6 +428,8 @@ lwcollection_split(const LWCOLLECTION* lwcoll_in, const LWGEOM* blade_in)
                        col->geoms[j]->srid = SRID_UNKNOWN; /* strip srid */
                        split_vector[split_vector_size++] = col->geoms[j];
                }
+               lwfree(col->geoms);
+               lwfree(col);
        }
 
        /* Now split_vector has split_vector_size geometries */