summaryrefslogtreecommitdiffstats
path: root/generic/tkMenu.c
diff options
context:
space:
mode:
authordas <das@noemail.net>2009-02-06 08:13:23 (GMT)
committerdas <das@noemail.net>2009-02-06 08:13:23 (GMT)
commita9631b38c61daa1e8bfde300df8e91a4638a4dd6 (patch)
tree44f593df44065d8dcb637789eb6a8916b17c1726 /generic/tkMenu.c
parenta44664092576de392a6e549e3918ccb2b06056d5 (diff)
downloadtk-a9631b38c61daa1e8bfde300df8e91a4638a4dd6.zip
tk-a9631b38c61daa1e8bfde300df8e91a4638a4dd6.tar.gz
tk-a9631b38c61daa1e8bfde300df8e91a4638a4dd6.tar.bz2
* generic/tkImgPhoto.c: fix numerous leaks discovered with the
* generic/tkMenu.c: Mac OS X Instruments.app Leaks tool. * generic/tkText.c: * generic/tkTextImage.c: * generic/tkTextIndex.c: * generic/tkUndo.c: * generic/ttk/ttkFrame.c: * macosx/tkMacOSXWm.c: FossilOrigin-Name: d9450816286ce996e1ed59081d8104370d645c5d
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 a402fc3..acb6ac9 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.41 2007/12/13 15:24:15 dgp Exp $
+ * RCS: @(#) $Id: tkMenu.c,v 1.41.2.1 2009/02/06 08:13:23 das Exp $
*/
/*
@@ -393,6 +393,13 @@ static Tk_ClassProcs menuClass = {
*--------------------------------------------------------------
*/
+static void
+FreeOptionTables(
+ ClientData clientData)
+{
+ ckfree(clientData);
+}
+
int
TkCreateMenuCmd(
Tcl_Interp *interp) /* Interpreter we are creating the command
@@ -417,7 +424,7 @@ TkCreateMenuCmd(
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");