From bae628841282684c69d3d30725eccf8a95ae7854 Mon Sep 17 00:00:00 2001 From: fvogel Date: Sun, 23 Jul 2023 12:15:44 +0000 Subject: Fix [499c0467b3]: DestroyMenuInstance(): use Tcl_EventuallyFree() rather than directly calling DestroyMenuEntry(). Patch from Christopher Chavez. --- generic/tkMenu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generic/tkMenu.c b/generic/tkMenu.c index fbf4e33..95a3b95 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -1176,7 +1176,8 @@ DestroyMenuInstance( * for menu entries (i+1)...numEntries. */ - DestroyMenuEntry(menuPtr->entries[i]); + Tcl_EventuallyFree(menuPtr->entries[i], + (Tcl_FreeProc*)DestroyMenuEntry); menuPtr->numEntries = i; } if (menuPtr->entries != NULL) { -- cgit v0.12