From ce25c38a23ae200cd8acd04d28b228967db60a5b Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 24 Apr 2002 13:29:01 +0000 Subject: [PATCH] [project @ 2002-04-24 13:29:01 by simonmar] freeStablePtr(): Only call freeStableName() if sn->ref == 0. From: Bernard James POPE --- ghc/rts/Stable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc/rts/Stable.c b/ghc/rts/Stable.c index 5cf9c28..474134e 100644 --- a/ghc/rts/Stable.c +++ b/ghc/rts/Stable.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Stable.c,v 1.20 2002/04/09 12:56:36 simonmar Exp $ + * $Id: Stable.c,v 1.21 2002/04/24 13:29:01 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -245,7 +245,7 @@ freeStablePtr(StgStablePtr sp) // If this entry has no StableName attached, then just free it // immediately. This is important; it might be a while before the // next major GC which actually collects the entry. - if (sn->sn_obj == NULL) { + if (sn->sn_obj == NULL && sn->ref == 0) { freeStableName(sn); } } -- 1.7.10.4