summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2007-04-23 00:50:09 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2007-04-23 00:50:09 (GMT)
commit076e6b32aa2f08565a146e877bd3197bc027b3a4 (patch)
treee7040991d1855362e6c89023cef55254db6f61ea /generic
parentfecfe33e134af58d4f2c86a715a7628e37b38446 (diff)
downloadtcl-076e6b32aa2f08565a146e877bd3197bc027b3a4.zip
tcl-076e6b32aa2f08565a146e877bd3197bc027b3a4.tar.gz
tcl-076e6b32aa2f08565a146e877bd3197bc027b3a4.tar.bz2
* generic/tclVar.c (TclDeleteNamespaceVars): fixed access to freed
memory detected by valgrind.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclVar.c5
1 files changed, 2 insertions, 3 deletions
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)) {