# HG changeset patch # User Sadrul Habib Chowdhury # Date 1186835522 0 # Node ID 1b416fee734c29d2b880d137d4f0445155503690 # Parent 3a0e6059d2ca32085c343eff0f87c8fc15a3d837 Crash fix. diff -r 3a0e6059d2ca -r 1b416fee734c finch/gntsound.c --- 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);