diff options
author | dgp <dgp@users.sourceforge.net> | 2017-12-06 19:57:59 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2017-12-06 19:57:59 (GMT) |
commit | 9ba4b4f90141907cd56d190574d5b1906fbbe23a (patch) | |
tree | dd2daf23b5e3fa63743b3d2866ee94cc2ea9dcfe /generic | |
parent | cf3348e41cba5b0d82271b5cd6f54df9912300a7 (diff) | |
download | tcl-9ba4b4f90141907cd56d190574d5b1906fbbe23a.zip tcl-9ba4b4f90141907cd56d190574d5b1906fbbe23a.tar.gz tcl-9ba4b4f90141907cd56d190574d5b1906fbbe23a.tar.bz2 |
[0e4d88b650] Added enough refcounting to stop `make valgrind` complaints about
"Invalid read". This is not a complete fix. Things are still broken.
A working system of Namespace lifetime management looks like an 8.7 project.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclBasic.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index acdcf41..79de61e 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -3112,6 +3112,7 @@ Tcl_DeleteCommandFromToken( * traces. */ + cmdPtr->nsPtr->refCount++; if (cmdPtr->tracePtr != NULL) { CommandTrace *tracePtr; CallCommandTraces(iPtr,cmdPtr,NULL,NULL,TCL_TRACE_DELETE); @@ -3139,6 +3140,7 @@ Tcl_DeleteCommandFromToken( */ TclInvalidateNsCmdLookup(cmdPtr->nsPtr); + TclNsDecrRefCount(cmdPtr->nsPtr); /* * If the command being deleted has a compile function, increment the |