GNOME Bugzilla – Bug 357798
gail uses g_object_get_property which is intended to be used by language bindings and leaks the values
Last modified: 2006-09-26 15:54:00 UTC
Got some complaints from valgrind about leaks from calling g_object_get_property() without freeing the value afterwards. g_value_unset() should be used. The api docs mention that g_object_get() is what really should be used in most places except language bindings though, so maybe that should be changed too? Here are the places the function call is used: [kmaraas@rivendell gail]$ grep g_object_get_property *.c gailbooleancell.c: g_object_get_property (G_OBJECT(cell->renderer), "active", &new_value); gailentry.c: g_object_get_property (obj, "editable", &value); gailentry.c: g_object_get_property (G_OBJECT (entry), "editable", &value); gailtreeview.c: g_object_get_property (cur_renderer->data, *prop_list, &value); gailwidget.c: g_object_get_property (G_OBJECT (widget), "parent", &value);
No idea about this at all. Padraig?
Created attachment 73430 [details] [review] Patch to fix bug I think that the call to g_object_get_property in gailtreeview.c needs to remian. I have added call to g_value_unset after it. I have removed the other calls to g_object_get_property
Great Padraig! Do you want to commit or shall I?