diff options
-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)) { |