summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorhobbs <hobbs>2003-11-11 19:41:49 (GMT)
committerhobbs <hobbs>2003-11-11 19:41:49 (GMT)
commit359e23ebdc992276e306cb81ac749dc725072d3f (patch)
treebdaaf7db9bc3afbd70d30c74b34c509764a44e75 /generic
parente14fceacc931a0c7f16a435383c3a427e69a26d0 (diff)
downloadtk-359e23ebdc992276e306cb81ac749dc725072d3f.zip
tk-359e23ebdc992276e306cb81ac749dc725072d3f.tar.gz
tk-359e23ebdc992276e306cb81ac749dc725072d3f.tar.bz2
* generic/tkListbox.c (ListboxDeleteSubCmd, ListboxListVarProc):
free itemconfig data when removing it from table. [Bug #836483]
Diffstat (limited to 'generic')
-rw-r--r--generic/tkListbox.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/generic/tkListbox.c b/generic/tkListbox.c
index 78977d6..0f60a95 100644
--- a/generic/tkListbox.c
+++ b/generic/tkListbox.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkListbox.c,v 1.29 2003/02/25 02:07:25 hobbs Exp $
+ * RCS: @(#) $Id: tkListbox.c,v 1.29.2.1 2003/11/11 19:41:50 hobbs Exp $
*/
#include "tkPort.h"
@@ -1402,8 +1402,7 @@ ListboxGetItemAttributes(interp, listPtr, index)
Tcl_HashEntry *entry;
ItemAttr *attrs;
- entry = Tcl_CreateHashEntry(listPtr->itemAttrTable, (char *)index,
- &new);
+ entry = Tcl_CreateHashEntry(listPtr->itemAttrTable, (char *)index, &new);
if (new) {
attrs = (ItemAttr *) ckalloc(sizeof(ItemAttr));
attrs->border = NULL;
@@ -2398,6 +2397,7 @@ ListboxDeleteSubCmd(listPtr, first, last)
entry = Tcl_FindHashEntry(listPtr->itemAttrTable, (char *)i);
if (entry != NULL) {
+ ckfree((char *)Tcl_GetHashValue(entry));
Tcl_DeleteHashEntry(entry);
}
@@ -3367,6 +3367,7 @@ ListboxListVarProc(clientData, interp, name1, name2, flags)
/* Clean up attributes */
entry = Tcl_FindHashEntry(listPtr->itemAttrTable, (char *)i);
if (entry != NULL) {
+ ckfree((char *)Tcl_GetHashValue(entry));
Tcl_DeleteHashEntry(entry);
}
}