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 | 9eaf1460251bf1325b30d9b2b6bfc7d06a427dbc (patch) | |
| tree | e7040991d1855362e6c89023cef55254db6f61ea | |
| parent | 6ea7cf0761671ebb96f56fa167bdc63071ba4d58 (diff) | |
| download | tcl-9eaf1460251bf1325b30d9b2b6bfc7d06a427dbc.zip tcl-9eaf1460251bf1325b30d9b2b6bfc7d06a427dbc.tar.gz tcl-9eaf1460251bf1325b30d9b2b6bfc7d06a427dbc.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)) { |
