diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2011-11-16 14:39:30 +0100 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2011-11-16 15:56:47 +0100 |
commit | 769a97c2ed9e6cbfda656a65483f6142423adc36 (patch) | |
tree | 2fd5a84dd6c4a41d4e4e61d37780d65a630fa72f /src/bytestream-factory.c | |
parent | dfccd984ac6c694a689c1f224efb4f4e2b27e01c (diff) | |
download | telepathy-gabble-769a97c2ed9e6cbfda656a65483f6142423adc36.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/bytestream-factory.c')
-rw-r--r-- | src/bytestream-factory.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bytestream-factory.c b/src/bytestream-factory.c index 12088b379..9413add04 100644 --- a/src/bytestream-factory.c +++ b/src/bytestream-factory.c @@ -679,16 +679,16 @@ gabble_bytestream_factory_dispose (GObject *object) priv->iq_socks5_cb, LM_MESSAGE_TYPE_IQ); lm_message_handler_unref (priv->iq_socks5_cb); - g_hash_table_destroy (priv->ibb_bytestreams); + g_hash_table_unref (priv->ibb_bytestreams); priv->ibb_bytestreams = NULL; - g_hash_table_destroy (priv->muc_bytestreams); + g_hash_table_unref (priv->muc_bytestreams); priv->muc_bytestreams = NULL; - g_hash_table_destroy (priv->socks5_bytestreams); + g_hash_table_unref (priv->socks5_bytestreams); priv->socks5_bytestreams = NULL; - g_hash_table_destroy (priv->multiple_bytestreams); + g_hash_table_unref (priv->multiple_bytestreams); priv->multiple_bytestreams = NULL; proxies = g_slist_concat (priv->socks5_proxies, |