diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2011-11-16 16:07:25 +0100 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2011-11-16 16:07:25 +0100 |
commit | ee2090321ca1530ada26c5431b9ba3dacfd4ea07 (patch) | |
tree | db9a88fe1e3b7e983c3ee08e13b50598931e8d2f /src/mcd-master.c | |
parent | 3e39bb0e14bcbbefcb98839e730d86864165f28b (diff) | |
download | telepathy-mission-control-ee2090321ca1530ada26c5431b9ba3dacfd4ea07.tar.gz |
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/
Diffstat (limited to 'src/mcd-master.c')
-rw-r--r-- | src/mcd-master.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mcd-master.c b/src/mcd-master.c index 06bb60ce..a88ed496 100644 --- a/src/mcd-master.c +++ b/src/mcd-master.c @@ -250,7 +250,7 @@ mcd_master_unload_mcd_plugins (McdMaster *master) module = g_ptr_array_index (priv->mcd_plugins, i); g_module_close (module); } - g_ptr_array_free (priv->mcd_plugins, TRUE); + g_ptr_array_unref (priv->mcd_plugins); priv->mcd_plugins = NULL; } @@ -405,7 +405,7 @@ _mcd_master_dispose (GObject * object) object); g_object_unref (plugin); } - g_ptr_array_free (priv->transport_plugins, TRUE); + g_ptr_array_unref (priv->transport_plugins); priv->transport_plugins = NULL; } |