summaryrefslogtreecommitdiffstats
path: root/generic/tkMenu.c
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2001-09-14 20:35:58 (GMT)
committerandreas_kupries <akupries@shaw.ca>2001-09-14 20:35:58 (GMT)
commitd8142ec988da069be185faa5b25c0cf258a7e452 (patch)
treeaf1e2d8738f97514fb3f07466e9b32fdf9fbe051 /generic/tkMenu.c
parentffdcd15f54e2b66fc95e9939934e9141674e3bad (diff)
downloadtk-d8142ec988da069be185faa5b25c0cf258a7e452.zip
tk-d8142ec988da069be185faa5b25c0cf258a7e452.tar.gz
tk-d8142ec988da069be185faa5b25c0cf258a7e452.tar.bz2
* generic/tkImgGIF.c:
* generic/tkImgPPM.c: * generic/tkImgPhoto.c: * generic/tkMenu.c: Applied patch [461578], provided by Vincent Darley. This fixes several memory leaks in the image code. They happen if there are errors during the initialization of the channel the image is supposed to be read from.
Diffstat (limited to 'generic/tkMenu.c')
-rw-r--r--generic/tkMenu.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/generic/tkMenu.c b/generic/tkMenu.c
index a4cc86c..84e338d 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.11 2001/08/01 16:21:11 dgp Exp $
+ * RCS: @(#) $Id: tkMenu.c,v 1.12 2001/09/14 20:35:58 andreas_kupries Exp $
*/
/*
@@ -2718,7 +2718,10 @@ CloneMenu(menuPtr, newMenuNamePtr, newMenuTypePtr)
== 0) {
Tcl_Obj *newElementPtr = Tcl_NewStringObj(
Tk_PathName(newMenuPtr->masterMenuPtr->tkwin), -1);
- Tcl_IncrRefCount(newElementPtr);
+ /*
+ * The newElementPtr will have its refCount incremented
+ * here, so we don't need to worry about it any more.
+ */
Tcl_ListObjReplace(menuPtr->interp, bindingsPtr,
i + 1, 0, 1, &newElementPtr);
newObjv[2] = bindingsPtr;