summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-15 13:22:49 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-15 13:22:49 (GMT)
commitc4f177f41c24e304076debfea279222a38b88060 (patch)
tree4890182b9e5db2e6a828d831036c1d1d1452677e
parentb2285feb18ebbcf95efeec554d49294c0d6c499a (diff)
downloadtcl-c4f177f41c24e304076debfea279222a38b88060.zip
tcl-c4f177f41c24e304076debfea279222a38b88060.tar.gz
tcl-c4f177f41c24e304076debfea279222a38b88060.tar.bz2
Proposed fix for [c7d0bc9a549714e0]. Thanks to mr_calvinbug_c7d0bc9a549714e0
-rw-r--r--generic/tclLiteral.c2
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];