summaryrefslogtreecommitdiffstats
path: root/generic/tkMenu.c
diff options
context:
space:
mode:
authordas <das>2009-02-06 08:14:28 (GMT)
committerdas <das>2009-02-06 08:14:28 (GMT)
commit1f997eede68e3ffe3fe7ca91b7c516ac4f06b3ea (patch)
tree2abe91563ad6a18f51a603d8c448ce85df67f85a /generic/tkMenu.c
parent9f0e53e5ba6a0596728589568db4e9b307cb9ae1 (diff)
downloadtk-1f997eede68e3ffe3fe7ca91b7c516ac4f06b3ea.zip
tk-1f997eede68e3ffe3fe7ca91b7c516ac4f06b3ea.tar.gz
tk-1f997eede68e3ffe3fe7ca91b7c516ac4f06b3ea.tar.bz2
* generic/tkImgPhoto.c: fix leaks discovered with the Mac OS X
* generic/tkMenu.c: Instruments.app Leaks tool. * macosx/tkMacOSXWm.c:
Diffstat (limited to 'generic/tkMenu.c')
-rw-r--r--generic/tkMenu.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/generic/tkMenu.c b/generic/tkMenu.c
index 5936e96..b2bbf88 100644
--- a/generic/tkMenu.c
+++ b/generic/tkMenu.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMenu.c,v 1.20.2.7 2006/05/25 23:51:37 hobbs Exp $
+ * RCS: @(#) $Id: tkMenu.c,v 1.20.2.8 2009/02/06 08:14:29 das Exp $
*/
/*
@@ -400,6 +400,13 @@ static Tk_ClassProcs menuClass = {
*--------------------------------------------------------------
*/
+static void
+FreeOptionTables(
+ ClientData clientData)
+{
+ ckfree(clientData);
+}
+
int
TkCreateMenuCmd(interp)
Tcl_Interp *interp; /* Interpreter we are creating the
@@ -424,7 +431,7 @@ TkCreateMenuCmd(interp)
Tk_CreateOptionTable(interp, specsArray[CHECK_BUTTON_ENTRY]);
Tcl_CreateObjCommand(interp, "menu", MenuCmd,
- (ClientData) optionTablesPtr, NULL);
+ (ClientData) optionTablesPtr, FreeOptionTables);
if (Tcl_IsSafe(interp)) {
Tcl_HideCommand(interp, "menu", "menu");