summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index d12a25c..ae11f7a 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -4181,6 +4181,9 @@ TEBCresume(
if (!TclIsVarUndefined(varPtr)) {
TclDecrRefCount(varPtr->value.objPtr);
+ TclSetVarUndefined(varPtr);
+ TclClearVarNamespaceVar(varPtr);
+ TclCleanupVar(varPtr, arrayPtr);
} else if (flags & TCL_LEAVE_ERR_MSG) {
goto slowUnsetArray;
}