diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2011-11-16 15:59:04 +0100 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2011-11-16 15:59:04 +0100 |
commit | 9ec9fd41456f199d95d05a0d29f040a169039d24 (patch) | |
tree | ff83ef1c93fc2b9c346859c4ae627540b087a84d /tests | |
parent | 3785f4686c084558b0b693c7d625088efe432d73 (diff) |
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 'tests')
-rw-r--r-- | tests/tp_caller.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/tp_caller.c b/tests/tp_caller.c index 5b871ac..6043b12 100644 --- a/tests/tp_caller.c +++ b/tests/tp_caller.c @@ -205,7 +205,7 @@ static TpConn *action_login(const char* sip_address, const char* sip_password, c check_conn_properties(conn); } - g_hash_table_destroy(connection_parameters); + g_hash_table_unref(connection_parameters); return conn; } |