From 5bb2c1c62a06e682ab48d530cae5f9614a90a75e Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Wed, 16 Nov 2011 15:31:29 +0100 Subject: Use _unref instead of _free _destroy when possible.unref Replace g_(ptr_)array_free (foo, TRUE) and g_hash_table_destroy with respectively g_(ptr_)array_unref (foo) and g_hash_table_unref. I used this command to generate this patch: for f in `find -name "*.c"`; do sed -i $f -re 's/g_ptr_array_free \(([^ ,]+), TRUE\)/g_ptr_array_unref \(\1\)/'; done See Danielle's blog for explanation of possible bug _free can do: http://blogs.gnome.org/danni/2011/11/16/mistakes-with-g_value_set_boxed/ --- libempathy-gtk/empathy-individual-menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libempathy-gtk/empathy-individual-menu.c') diff --git a/libempathy-gtk/empathy-individual-menu.c b/libempathy-gtk/empathy-individual-menu.c index 2209e1538..27b2c67c2 100644 --- a/libempathy-gtk/empathy-individual-menu.c +++ b/libempathy-gtk/empathy-individual-menu.c @@ -1420,7 +1420,7 @@ empathy_individual_invite_menu_item_new (FolksIndividual *individual, gtk_widget_show (image); - g_hash_table_destroy (name_room_map); + g_hash_table_unref (name_room_map); g_object_unref (mgr); g_list_free (names); g_list_free (rooms); -- cgit v1.2.3