diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2007-04-23 00:50:09 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2007-04-23 00:50:09 (GMT) |
commit | 076e6b32aa2f08565a146e877bd3197bc027b3a4 (patch) | |
tree | e7040991d1855362e6c89023cef55254db6f61ea | |
parent | fecfe33e134af58d4f2c86a715a7628e37b38446 (diff) | |
download | tcl-076e6b32aa2f08565a146e877bd3197bc027b3a4.zip tcl-076e6b32aa2f08565a146e877bd3197bc027b3a4.tar.gz tcl-076e6b32aa2f08565a146e877bd3197bc027b3a4.tar.bz2 |
* generic/tclVar.c (TclDeleteNamespaceVars): fixed access to freed
memory detected by valgrind.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tclVar.c | 5 |
2 files changed, 7 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2007-04-22 Miguel Sofer <msofer@users.sf.net> + + * generic/tclVar.c (TclDeleteNamespaceVars): fixed access to freed + memory detected by valgrind. + 2007-04-21 Jeff Hobbs <jeffh@ActiveState.com> *** 8.5a6 TAGGED FOR RELEASE *** diff --git a/generic/tclVar.c b/generic/tclVar.c index 1582c26..05c3b4e 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.130 2007/04/20 06:10:59 kennykb Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.131 2007/04/23 00:50:10 msofer Exp $ */ #include "tclInt.h" @@ -4063,7 +4063,6 @@ TclDeleteNamespaceVars( Tcl_HashSearch search; Tcl_HashEntry *hPtr; int flags = 0; - Namespace *currNsPtr = (Namespace *) Tcl_GetCurrentNamespace(interp); /* * Determine what flags to pass to the trace callback functions. @@ -4071,7 +4070,7 @@ TclDeleteNamespaceVars( if (nsPtr == iPtr->globalNsPtr) { flags = TCL_GLOBAL_ONLY; - } else if (nsPtr == currNsPtr) { + } else if (nsPtr == (Namespace *) Tcl_GetCurrentNamespace(interp)) { flags = TCL_NAMESPACE_ONLY; } if (Tcl_InterpDeleted(interp)) { |