id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc 2277,Bug in postgis/lwgeom_geos_prepared.c,woodbri,pramsey,"In reading through the code in ""postgis/lwgeom_geos_prepared.c"" I have noticed a bug: {{{ static void DeletePrepGeomHashEntry(MemoryContext mcxt) { void **key; PrepGeomHashEntry *he; /* The hash key is the MemoryContext pointer */ key = (void *)&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); } }}} Notice that if he == NULL, you will never get to the if (!he) statement because you will have already segv'd on the prior two statements trying to access he. ",defect,closed,medium,,postgis,2.0.x,fixed,,