diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2010-11-18 00:35:18 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2010-11-18 00:35:18 (GMT) |
commit | 3f2525724acdd550fd3b577eefd493a61d49e3b8 (patch) | |
tree | 7d1fcf9b103f73b0743c53afceff7532097ed846 | |
parent | 653c10ee03ae1c5d17bcb243c176d2dbe4cfbe37 (diff) | |
download | tcl-3f2525724acdd550fd3b577eefd493a61d49e3b8.zip tcl-3f2525724acdd550fd3b577eefd493a61d49e3b8.tar.gz tcl-3f2525724acdd550fd3b577eefd493a61d49e3b8.tar.bz2 |
* generic/tclNamesp.c: fix leak due to bad looping construct,
[Bug 3111059]
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tclNamesp.c | 8 |
2 files changed, 8 insertions, 5 deletions
@@ -1,3 +1,8 @@ +2010-11-18 Miguel Sofer <msofer@users.sf.net> + + * generic/tclNamesp.c: fix leak due to bad looping construct, + [Bug 3111059] + 2010-11-17 Jan Nijtmans <nijtmans@users.sf.net> * win/tcl.m4: [FRQ 491789]: "setargv() doesn't support a diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 89e8a21..e6bed55 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -22,7 +22,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.214 2010/10/20 20:52:28 ferrieux Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.215 2010/11/18 00:35:18 msofer Exp $ */ #include "tclInt.h" @@ -881,14 +881,12 @@ Tcl_DeleteNamespace( */ for (entryPtr = Tcl_FirstHashEntry(&nsPtr->cmdTable, &search); - entryPtr != NULL;) { + entryPtr != NULL; + entryPtr = Tcl_FirstHashEntry(&nsPtr->cmdTable, &search)) { cmdPtr = (Command *) Tcl_GetHashValue(entryPtr); if (cmdPtr->nreProc == NRInterpCoroutine) { Tcl_DeleteCommandFromToken((Tcl_Interp *) iPtr, (Tcl_Command) cmdPtr); - entryPtr = Tcl_FirstHashEntry(&nsPtr->cmdTable, &search); - } else { - entryPtr = entryPtr->nextPtr; } } |