Mercurial > pidgin.yaz
changeset 19182:1b416fee734c
Crash fix.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sat, 11 Aug 2007 12:32:02 +0000 |
parents | 3a0e6059d2ca |
children | 772670b9e9f8 |
files | finch/gntsound.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/gntsound.c Sat Aug 11 12:26:22 2007 +0000 +++ b/finch/gntsound.c Sat Aug 11 12:32:02 2007 +0000 @@ -896,8 +896,10 @@ itr = list = finch_sound_get_profiles(); for (; itr; itr = itr->next) { - gnt_tree_add_row_after(GNT_TREE(tree), itr->data, gnt_tree_create_row(GNT_TREE(tree), itr->data), NULL, NULL); - g_free(itr->data); + /* Do not free itr->data. It's the stored as a key for the tree, and will + * be freed when the tree is destroyed. */ + gnt_tree_add_row_after(GNT_TREE(tree), itr->data, + gnt_tree_create_row(GNT_TREE(tree), itr->data), NULL, NULL); } g_list_free(list);