diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-09-16 09:06:41 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-09-16 09:06:41 (GMT) |
commit | 1dbcf0c93e804523b3eed57e1716fdec5497f31c (patch) | |
tree | 4890182b9e5db2e6a828d831036c1d1d1452677e | |
parent | b2285feb18ebbcf95efeec554d49294c0d6c499a (diff) | |
parent | c4f177f41c24e304076debfea279222a38b88060 (diff) | |
download | tcl-1dbcf0c93e804523b3eed57e1716fdec5497f31c.zip tcl-1dbcf0c93e804523b3eed57e1716fdec5497f31c.tar.gz tcl-1dbcf0c93e804523b3eed57e1716fdec5497f31c.tar.bz2 |
Fix [c7d0bc9a549714e0]: Newly introduced unshared (local-only) literals from cmd resolvers cause Tcl_Obj leaks.
-rw-r--r-- | generic/tclLiteral.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c index aeb8213..4ae94a0 100644 --- a/generic/tclLiteral.c +++ b/generic/tclLiteral.c @@ -234,7 +234,6 @@ TclCreateLiteral( */ TclNewObj(objPtr); - Tcl_IncrRefCount(objPtr); if ((flags & LITERAL_ON_HEAP)) { objPtr->bytes = bytes; objPtr->length = length; @@ -261,6 +260,7 @@ TclCreateLiteral( globalPtr = ckalloc(sizeof(LiteralEntry)); globalPtr->objPtr = objPtr; + Tcl_IncrRefCount(objPtr); globalPtr->refCount = 1; globalPtr->nsPtr = nsPtr; globalPtr->nextPtr = globalTablePtr->buckets[globalHash]; |