From: Sandro Santilli Date: Sat, 29 Aug 2015 09:19:59 +0000 (+0000) Subject: Do not reference face object after free X-Git-Tag: 2.2.0rc1~68 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=535adff0f646f1601382132542cac1c5d4c49184;p=postgis Do not reference face object after free git-svn-id: http://svn.osgeo.org/postgis/trunk@14026 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/NEWS b/NEWS index 48bb57ebd..1c452a7a6 100644 --- a/NEWS +++ b/NEWS @@ -92,9 +92,9 @@ PostGIS 2.2.0 - #2652, Add --upgrade-path switch to run_test.pl - #2754, sfcgal wrapped as an extension - #2227, Simplification with Visvalingam-Whyatt algorithm - ST_SimplifyVW, ST_SetEffectiveArea (Nicklas Avèn) + ST_SimplifyVW, ST_SetEffectiveArea (Nicklas Avén) - Functions to encode and decode TWKB - ST_AsTWKB, ST_GeomFromTWKB (Paul Ramsey / Nicklas Avèn / CartoDB) + ST_AsTWKB, ST_GeomFromTWKB (Paul Ramsey / Nicklas Avén / CartoDB) * Enhancements * @@ -787,7 +787,7 @@ PostGIS 2.0.0 - Topology support improved, documented, testing, bug fixes (Sandro Santilli / Faunalia for RT-SIGTA, Regina Obe, Andrea Peri, Jose Carlos Martinez Llari) - - 3D relationship support functions (Nicklas Avèn) + - 3D relationship support functions (Nicklas Avén) ST_3DDistance, ST_3DClosestPoint, ST_3DIntersects, ST_3DShortestLine - ST_Split (Sandro Santilli / Faunalia for RT-SIGTA) diff --git a/liblwgeom/lwgeom_topo.c b/liblwgeom/lwgeom_topo.c index 77f71c266..bd770b5d4 100644 --- a/liblwgeom/lwgeom_topo.c +++ b/liblwgeom/lwgeom_topo.c @@ -5628,12 +5628,12 @@ lwt_AddPolygon(LWT_TOPOLOGY* topo, LWPOLY* poly, double tol, int* nfaces) fg = lwt_GetFaceGeometry( topo, f->face_id ); if ( ! fg ) { + i = f->face_id; /* so we can destroy faces */ GEOSPreparedGeom_destroy(ppoly); GEOSGeom_destroy(polyg); lwfree(ids); _lwt_release_faces(faces, nfacesinbox); - lwerror("Could not get geometry of face %" LWTFMT_ELEMID, - f->face_id); + lwerror("Could not get geometry of face %" LWTFMT_ELEMID, i); return NULL; } /* check if a point on this face's surface is covered by our polygon */