From 692b242fdf4e941b65492cbd8f545835f61e92aa Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Tue, 23 Apr 2013 21:03:35 +0000 Subject: [PATCH] #2277, potential segfault condition removed git-svn-id: http://svn.osgeo.org/postgis/trunk@11315 b70326c6-7e19-0410-871a-916f4a2858ee --- postgis/lwgeom_geos_prepared.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/postgis/lwgeom_geos_prepared.c b/postgis/lwgeom_geos_prepared.c index 2913613dc..207a5ebb7 100644 --- a/postgis/lwgeom_geos_prepared.c +++ b/postgis/lwgeom_geos_prepared.c @@ -259,11 +259,13 @@ DeletePrepGeomHashEntry(MemoryContext mcxt) /* Delete the projection object from the hash */ he = (PrepGeomHashEntry *) hash_search(PrepGeomHash, key, HASH_REMOVE, NULL); - he->prepared_geom = NULL; - he->geom = NULL; - if (!he) + { elog(ERROR, "DeletePrepGeomHashEntry: There was an error removing the geometry object from this MemoryContext (%p)", (void *)mcxt); + } + + he->prepared_geom = NULL; + he->geom = NULL; } /** -- 2.40.0