diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-04-04 14:31:43 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-04-04 14:31:43 (GMT) |
commit | 226bb13f4e093299c9d975ebd16c6cacb4af6356 (patch) | |
tree | 0248bd8acf2fac9dfed09af1cc6ca4717fe0a88b /generic/tclOO.c | |
parent | 7f4cc308f37a5729cb679b8c859e8dba993095ca (diff) | |
download | tcl-226bb13f4e093299c9d975ebd16c6cacb4af6356.zip tcl-226bb13f4e093299c9d975ebd16c6cacb4af6356.tar.gz tcl-226bb13f4e093299c9d975ebd16c6cacb4af6356.tar.bz2 |
Fix [https://github.com/tcltk/tcl/runs/2263266926|failing test-cases] with --enable-symbols=mem build by reverting the series of commits that caused the memory-leak
Diffstat (limited to 'generic/tclOO.c')
-rw-r--r-- | generic/tclOO.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/generic/tclOO.c b/generic/tclOO.c index 452e2ef..405d5d0 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -1184,19 +1184,18 @@ ObjectNamespaceDeleted( * freed memory. */ - if (oPtr->command != NULL) { - if (((Command *) oPtr->command)->flags && CMD_DYING) { - /* - * The command is already (being) deleted. Proceed to clean up the the namespace, - */ - } else { - /* - * The namespace must have been deleted directly. Delete the command - * as well. - */ + if (((Command *) oPtr->command)->flags && CMD_DYING) { + /* + * Something has already started the command deletion process. We can + * go ahead and clean up the the namespace, + */ + } else { + /* + * The namespace must have been deleted directly. Delete the command + * as well. + */ - Tcl_DeleteCommandFromToken(oPtr->fPtr->interp, oPtr->command); - } + Tcl_DeleteCommandFromToken(oPtr->fPtr->interp, oPtr->command); } if (oPtr->myclassCommand) { |