]> git.0d.be Git - empathy.git/commit
Use _unref instead of _free _destroy when possible.unref
authorXavier Claessens <xclaesse@gmail.com>
Wed, 16 Nov 2011 14:31:29 +0000 (15:31 +0100)
committerXavier Claessens <xclaesse@gmail.com>
Wed, 16 Nov 2011 14:57:00 +0000 (15:57 +0100)
commit5bb2c1c62a06e682ab48d530cae5f9614a90a75e
treea847e5c1980d69126b8d7974808cb70923becb33
parentba6e07cc5a0bf75118c12fd5ebf05e4453a5dc80
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/
31 files changed:
goa-mc-plugin/mcp-account-manager-goa.c
libempathy-gtk/empathy-contact-list-store.c
libempathy-gtk/empathy-contact-search-dialog.c
libempathy-gtk/empathy-contactinfo-utils.c
libempathy-gtk/empathy-individual-linker.c
libempathy-gtk/empathy-individual-menu.c
libempathy-gtk/empathy-individual-store.c
libempathy-gtk/empathy-individual-view.c
libempathy-gtk/empathy-individual-widget.c
libempathy-gtk/empathy-notify-manager.c
libempathy-gtk/empathy-persona-store.c
libempathy-gtk/empathy-protocol-chooser.c
libempathy-gtk/empathy-spell.c
libempathy/empathy-account-settings.c
libempathy/empathy-contact-manager.c
libempathy/empathy-debug.c
libempathy/empathy-ft-handler.c
libempathy/empathy-individual-manager.c
libempathy/empathy-irc-network-manager.c
libempathy/empathy-tp-chat.c
libempathy/empathy-tp-contact-list.c
libempathy/empathy-tp-file.c
libempathy/empathy-tp-roomlist.c
libempathy/empathy-tp-streamed-media.c
src/empathy-debug-window.c
src/empathy-ft-manager.c
src/empathy-import-utils.c
src/empathy-main-window.c
src/empathy-map-view.c
tests/empathy-chatroom-manager-test.c
tests/empathy-tls-test.c