From: simonmar Date: Wed, 24 Apr 2002 13:29:01 +0000 (+0000) Subject: [project @ 2002-04-24 13:29:01 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~2103 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=ce25c38a23ae200cd8acd04d28b228967db60a5b;p=ghc-hetmet.git [project @ 2002-04-24 13:29:01 by simonmar] freeStablePtr(): Only call freeStableName() if sn->ref == 0. From: Bernard James POPE --- 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); } }