summaryrefslogtreecommitdiffstats
path: root/generic/tkListbox.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2003-11-11 19:42:05 (GMT)
committerhobbs <hobbs>2003-11-11 19:42:05 (GMT)
commit417680d8c98f70d63ac1c4224c45f34a9ccade14 (patch)
tree7c57155a7f17bd584eba001efba61b91ffb8a233 /generic/tkListbox.c
parentbbf3f6c3e74e218b131dad46b3f29511d8c27867 (diff)
downloadtk-417680d8c98f70d63ac1c4224c45f34a9ccade14.zip
tk-417680d8c98f70d63ac1c4224c45f34a9ccade14.tar.gz
tk-417680d8c98f70d63ac1c4224c45f34a9ccade14.tar.bz2
* generic/tkListbox.c (ListboxDeleteSubCmd, ListboxListVarProc):
free itemconfig data when removing it from table. [Bug #836483]
Diffstat (limited to 'generic/tkListbox.c')
-rw-r--r--generic/tkListbox.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/generic/tkListbox.c b/generic/tkListbox.c
index 6403a71..d40a45a 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.30 2003/08/27 15:47:41 dkf Exp $
+ * RCS: @(#) $Id: tkListbox.c,v 1.31 2003/11/11 19:42:05 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);
}
@@ -3366,6 +3366,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);
}
}