summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2020-01-31 17:48:15 (GMT)
committersebres <sebres@users.sourceforge.net>2020-01-31 17:48:15 (GMT)
commit66811db830786c136933150c85f07248b172e5a2 (patch)
tree9df404c4ae3604dd139d6938bff62e35e847b416 /generic
parentb3d109d0deac59559df22f72622d94b9793d2a79 (diff)
downloadtk-66811db830786c136933150c85f07248b172e5a2.zip
tk-66811db830786c136933150c85f07248b172e5a2.tar.gz
tk-66811db830786c136933150c85f07248b172e5a2.tar.bz2
fixed segfault [a196fb11]: wrong handling in ClearLookupTable (if object is not NULL) as well as working on deleted table (in DeleteVirtualEventTable).
Diffstat (limited to 'generic')
-rw-r--r--generic/tkBind.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c
index f65d2ee..1443270 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -1142,13 +1142,13 @@ ClearLookupTable(
if (key->object != object) {
continue;
}
- Tcl_DeleteHashEntry(hPtr);
}
psList = Tcl_GetHashValue(hPtr);
PSList_Move(pool, psList);
ckfree(psList);
DEBUG(countListItems -= 1;)
+ Tcl_DeleteHashEntry(hPtr);
}
}
@@ -3444,9 +3444,10 @@ DeleteVirtualEventTable(
ckfree(Tcl_GetHashValue(hPtr));
}
Tcl_DeleteHashTable(&vetPtr->nameTable);
- Tcl_DeleteHashTable(&vetPtr->lookupTables.listTable);
ClearLookupTable(&vetPtr->lookupTables, NULL);
+ Tcl_DeleteHashTable(&vetPtr->lookupTables.listTable);
+
DEBUG(countEntryItems -= PSList_Size(&vetPtr->lookupTables.entryPool);)
PSList_Traverse(&vetPtr->lookupTables.entryPool, FreePatSeqEntry);
}