diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2007-06-24 16:05:28 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2007-06-24 16:05:28 (GMT) |
commit | ef5e016071297f4dcb42c24beabf771feb1f1c68 (patch) | |
tree | 162877abf8c867c44a139f86868d251b8b08b8ef | |
parent | 86e0625ea8d0be5127e0213dd834e0f5995cbac3 (diff) | |
download | tcl-ef5e016071297f4dcb42c24beabf771feb1f1c68.zip tcl-ef5e016071297f4dcb42c24beabf771feb1f1c68.tar.gz tcl-ef5e016071297f4dcb42c24beabf771feb1f1c68.tar.bz2 |
* generic/tclVar.c (UnsetVarStruct): fixed a leak introduced in
last commit.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tclVar.c | 9 |
2 files changed, 13 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2007-06-24 Miguel Sofer <msofer@users.sf.net> + + * generic/tclVar.c (UnsetVarStruct): fixed a leak introduced in + last commit. + 2007-06-23 Miguel Sofer <msofer@users.sf.net> * generic/tclVar.c (UnsetVarStruct, TclDeleteVars): made the logic diff --git a/generic/tclVar.c b/generic/tclVar.c index 576aa0a..e7ee850 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.138 2007/06/23 18:13:01 msofer Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.139 2007/06/24 16:05:29 msofer Exp $ */ #include "tclInt.h" @@ -2181,6 +2181,13 @@ UnsetVarStruct( } } + if (!reachable) { + TclSetVarUndefined(varPtr); + TclSetVarScalar(varPtr); + varPtr->tracePtr = NULL; + varPtr->searchPtr = NULL; + } + /* * If the variable was a namespace variable, decrement its reference * count. |