After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 357798 - gail uses g_object_get_property which is intended to be used by language bindings and leaks the values
gail uses g_object_get_property which is intended to be used by language bind...
Status: RESOLVED FIXED
Product: atk
Classification: Platform
Component: gail
git master
Other Linux
: Normal normal
: ---
Assigned To: bill.haneman
bill.haneman
Depends on:
Blocks:
 
 
Reported: 2006-09-26 12:10 UTC by Kjartan Maraas
Modified: 2006-09-26 15:54 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Patch to fix bug (4.19 KB, patch)
2006-09-26 13:50 UTC, padraig.obriain
committed Details | Review

Description Kjartan Maraas 2006-09-26 12:10:41 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);
Comment 1 bill.haneman 2006-09-26 12:16:12 UTC
No idea about this at all.  Padraig?
Comment 2 padraig.obriain 2006-09-26 13:50:49 UTC
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
Comment 3 bill.haneman 2006-09-26 14:21:49 UTC
Great Padraig! Do you want to commit or shall I?