[Telepathy] Potential issue in all our modules based on glib

Xavier Claessens xclaesse at gmail.com
Wed Nov 16 07:16:25 PST 2011


Hi,

I recently discovered an issue in telepathy-yell. It is well described
in Danielle's blog post:
http://blogs.gnome.org/danni/2011/11/16/mistakes-with-g_value_set_boxed/

I already patched git master for: telepathy-glib, teleapthy-yell,
telepathy-gabble, telepathy-salut, telepathy-rakia,
telepathy-mission-control and empathy.

To be sure, I've also updated their coding style checker to not allow
g_array_free (foo, TRUE) and g_hash_table_destroy (foo).

If you think your module is affected as well, please copy
telepathy-glib/tools/check-c-style.sh into your module and run command:

for f in `find -name "*.c"`; do sed -i $f -re 's/g_array_free
\(([^ ,]+), TRUE\)/g_array_unref \(\1\)/'; done

for f in `find -name "*.c"`; do sed -i $f -re 's/g_ptr_array_free
\(([^ ,]+), TRUE\)/g_ptr_array_unref \(\1\)/'; done

for f in `find -name "*.c"`; do sed -i $f -re
's/g_hash_table_destroy/g_hash_table_unref/'; done

We should eventually patch stable branches as well?

Regards,
Xavier Claessens.



More information about the telepathy mailing list