diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2010-07-31 18:10:10 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2010-07-31 18:10:10 (GMT) |
commit | 30e22dc7a202f75004fcafaa953b6470e7e1101f (patch) | |
tree | 1d5a920156b435c85f7494ad643f62ffe848a9d9 /generic/tclVar.c | |
parent | 5cbb5a46c8f2983cc68798d12d55b96cf0f1ec4f (diff) | |
download | tcl-30e22dc7a202f75004fcafaa953b6470e7e1101f.zip tcl-30e22dc7a202f75004fcafaa953b6470e7e1101f.tar.gz tcl-30e22dc7a202f75004fcafaa953b6470e7e1101f.tar.bz2 |
* generic/tclVar.c: fix for crash [Bug 3037525]: lose fickle
optimisation in TclDeleteVars (used for runtime-created locals)
Diffstat (limited to 'generic/tclVar.c')
-rw-r--r-- | generic/tclVar.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c index 36db617..c23681f 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -16,7 +16,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.160.2.9 2010/02/03 13:28:44 dkf Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.160.2.10 2010/07/31 18:10:11 msofer Exp $ */ #include "tclInt.h" @@ -4521,14 +4521,10 @@ TclDeleteVars( } for (varPtr = VarHashFirstVar(tablePtr, &search); varPtr != NULL; - varPtr = VarHashNextVar(&search)) { - /* - * Lie about the validity of the hashtable entry. In this way the - * variables will be deleted by VarHashDeleteTable. - */ + varPtr = VarHashFirstVar(tablePtr, &search)) { - VarHashInvalidateEntry(varPtr); UnsetVarStruct(varPtr, NULL, iPtr, VarHashGetKey(varPtr), NULL, flags); + VarHashDeleteEntry(varPtr); } VarHashDeleteTable(tablePtr); } |