From 07fd0a12862faf2a4562a437debb755212d4a1ef Mon Sep 17 00:00:00 2001 From: sewardj Date: Mon, 12 Feb 2001 16:40:34 +0000 Subject: [PATCH] [project @ 2001-02-12 16:40:34 by sewardj] Free the local symbol table at the end of the ocResolve_ phase; we won't need it after that. --- ghc/rts/Linker.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ghc/rts/Linker.c b/ghc/rts/Linker.c index 02be005..0628423 100644 --- a/ghc/rts/Linker.c +++ b/ghc/rts/Linker.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Linker.c,v 1.25 2001/02/12 13:30:15 sewardj Exp $ + * $Id: Linker.c,v 1.26 2001/02/12 16:40:34 sewardj Exp $ * * (c) The GHC Team, 2000 * @@ -463,7 +463,9 @@ unloadObj( char *path ) free(oc->fileName); free(oc->symbols); free(oc->sections); - freeHashTable(oc->lochash, NULL); + /* The local hash table should have been freed at the end + of the ocResolve_ call on it. */ + ASSERT(oc->lochash == NULL); free(oc); return 1; } @@ -1611,6 +1613,10 @@ ocResolve_ELF ( ObjectCode* oc ) } } + /* Free the local symbol table; we won't need it again. */ + freeHashTable(oc->lochash, NULL); + oc->lochash = NULL; + return 1; } -- 1.7.10.4