summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 954b2b3..fa13b50 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -1388,12 +1388,15 @@ DeleteInterpProc(
hPtr != NULL;
hPtr = Tcl_NextHashEntry(&hSearch)) {
CmdFrame *cfPtr = Tcl_GetHashValue(hPtr);
-
- if (cfPtr->type == TCL_LOCATION_SOURCE) {
- Tcl_DecrRefCount(cfPtr->data.eval.path);
+ Proc *procPtr = (Proc *) Tcl_GetHashKey(iPtr->linePBodyPtr, hPtr);
+ procPtr->iPtr = NULL;
+ if (cfPtr) {
+ if (cfPtr->type == TCL_LOCATION_SOURCE) {
+ Tcl_DecrRefCount(cfPtr->data.eval.path);
+ }
+ ckfree((char *) cfPtr->line);
+ ckfree((char *) cfPtr);
}
- ckfree((char *) cfPtr->line);
- ckfree((char *) cfPtr);
Tcl_DeleteHashEntry(hPtr);
}
Tcl_DeleteHashTable(iPtr->linePBodyPtr);