mirror of
https://git.osgeo.org/gitea/postgis/postgis
synced 2024-10-24 17:12:35 +00:00
Remove a double-free bug caused if the unparser finds an invalid geometry (fixes #168)
git-svn-id: http://svn.osgeo.org/postgis/trunk@4078 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
parent
b5615b4fbf
commit
2c9c365a5c
|
@ -357,8 +357,6 @@ output_polygon_ring_collection(uchar* geom,outfunc func,int supress)
|
|||
(first_point[0] != last_point[0] || first_point[1] != last_point[1] ) &&
|
||||
(current_unparser_check_flags & PARSER_CHECK_CLOSURE))
|
||||
{
|
||||
lwfree(first_point);
|
||||
lwfree(last_point);
|
||||
LWGEOM_WKT_UNPARSER_ERROR(UNPARSER_ERROR_UNCLOSED);
|
||||
}
|
||||
|
||||
|
@ -366,8 +364,6 @@ output_polygon_ring_collection(uchar* geom,outfunc func,int supress)
|
|||
/* Ensure that POLYGON has a minimum of 4 points */
|
||||
if ((current_unparser_check_flags & PARSER_CHECK_MINPOINTS) && orig_cnt < 4)
|
||||
{
|
||||
lwfree(first_point);
|
||||
lwfree(last_point);
|
||||
LWGEOM_WKT_UNPARSER_ERROR(UNPARSER_ERROR_MOREPOINTS);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue