summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tclUtil.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 0c2f305..dab5c3a 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -4340,8 +4340,7 @@ TclGetProcessGlobalValue(
*/
Tcl_ExternalToUtfDString(NULL, pgvPtr->value, pgvPtr->numBytes, &newValue);
- value = Tcl_NewStringObj(Tcl_DStringValue(&newValue), Tcl_DStringLength(&newValue));
- Tcl_DStringFree(&newValue);
+ value = TclDStringToObj(&newValue);
hPtr = Tcl_CreateHashEntry(cacheMap,
INT2PTR(pgvPtr->epoch), &dummy);
Tcl_MutexUnlock(&pgvPtr->mutex);