From 61af839f961ea85dc80bed03313ee318fc02fa00 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Wed, 13 Jun 2007 11:15:52 +0000 Subject: [PATCH 1/1] another fix for -hb: we appear to be freeing the hash table and arena twice --- rts/ProfHeap.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rts/ProfHeap.c b/rts/ProfHeap.c index ed5dc36..f1a3b05 100644 --- a/rts/ProfHeap.c +++ b/rts/ProfHeap.c @@ -343,8 +343,12 @@ initEra(Census *census) STATIC_INLINE void freeEra(Census *census) { - arenaFree(census->arena); - freeHashTable(census->hash, NULL); + if (RtsFlags.ProfFlags.bioSelector != NULL) + // when bioSelector==NULL, these are freed in heapCensus() + { + arenaFree(census->arena); + freeHashTable(census->hash, NULL); + } } /* -------------------------------------------------------------------------- -- 1.7.10.4