summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWm.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2023-05-03 19:42:42 (GMT)
committerfvogel <fvogelnew1@free.fr>2023-05-03 19:42:42 (GMT)
commitee29525bccedf7e497220bd542fd812334a78229 (patch)
tree543f1aee720cde356f27ed2583d5487ead3adf29 /macosx/tkMacOSXWm.c
parente5f42d041cd692c44bce973ea5898d706c317a9d (diff)
downloadtk-ee29525bccedf7e497220bd542fd812334a78229.zip
tk-ee29525bccedf7e497220bd542fd812334a78229.tar.gz
tk-ee29525bccedf7e497220bd542fd812334a78229.tar.bz2
Fix [ba956c8ff7]: Aqua: TIP 655 use-after-free.
Diffstat (limited to 'macosx/tkMacOSXWm.c')
-rw-r--r--macosx/tkMacOSXWm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index eccffdb..345d66e 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -6698,7 +6698,6 @@ TkMacOSXMakeRealWindowExist(
if (hPtr) {
tabbingId = Tcl_GetHashValue(hPtr);
Tcl_DeleteHashEntry(hPtr);
- ckfree(tabbingId);
}
hPtr = Tcl_FindHashEntry(&pathnameToTabbingMode, Tk_PathName(winPtr));
if (hPtr) {
@@ -6763,6 +6762,9 @@ TkMacOSXMakeRealWindowExist(
[window setTabbingIdentifier: identifier];
[window setTabbingMode: tabbingMode];
#endif
+ if (tabbingId) {
+ ckfree(tabbingId);
+ }
TKContentView *contentView = [[TKContentView alloc]
initWithFrame:NSZeroRect];
[window setContentView:contentView];