GNOME Bugzilla – Bug 710453
libgee memory leak fixes
Last modified: 2013-10-22 09:45:14 UTC
Patch coming up to fix a number of reference count leaks caused by incorrect use of libgee.
Created attachment 257638 [details] [review] libempathy-gtk: Fix several memory leaks from libgee libgee’s GeeIterator returns a new reference from most of its methods, especially gee_iterable_iterator() and gee_iterator_get(). Add corresponding g_object_unref() calls.
Created attachment 257639 [details] [review] libempathy: Fix several memory leaks from libgee See commit 039dc326208e02b687e93739434e27a867f4ffa7.
Also available as a branch here: http://cgit.collabora.com/git/user/pwith/empathy.git/log/?h=710453-libgee-memory-leaks
Created attachment 257640 [details] [review] libempathy-gtk: Fix several memory leaks from libgee libgee’s GeeIterator returns a new reference from most of its methods, especially gee_iterable_iterator() and gee_iterator_get(). Add corresponding g_object_unref() calls.
Created attachment 257641 [details] [review] libempathy: Fix several memory leaks from libgee See commit 039dc326208e02b687e93739434e27a867f4ffa7.
Review of attachment 257640 [details] [review]: Thanks for for this. A small thing to check and it's good to go (3.10 and master). ::: libempathy-gtk/empathy-individual-menu.c @@ +344,1 @@ + number = folks_phone_field_details_get_normalised (details); shouldn't you free 'number'at some point? @@ +469,2 @@ type = find_phone_type (details); + number = folks_phone_field_details_get_normalised (details); ... you free number after this call so either this one or the previous call is wrong.
Review of attachment 257641 [details] [review]: ++ 3.10 and master please.
(In reply to comment #6) > ::: libempathy-gtk/empathy-individual-menu.c > @@ +344,1 @@ > + number = folks_phone_field_details_get_normalised (details); > > shouldn't you free 'number'at some point? Whoops, yes. Fixed before merging. Merged to master: commit 35b9f0c90f66e81f5008ff866b5b4b4b47aae0a5 Author: Philip Withnall <philip.withnall@collabora.co.uk> Date: Fri Oct 18 14:26:43 2013 +0100 libempathy: Fix several memory leaks from libgee See commit 039dc326208e02b687e93739434e27a867f4ffa7. https://bugzilla.gnome.org/show_bug.cgi?id=710453 libempathy/empathy-individual-manager.c | 9 ++++++--- libempathy/empathy-utils.c | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) commit 5d618c618444363615431646471df7670ed76cf1 Author: Philip Withnall <philip.withnall@collabora.co.uk> Date: Fri Oct 18 14:24:15 2013 +0100 libempathy-gtk: Fix several memory leaks from libgee libgee’s GeeIterator returns a new reference from most of its methods, especially gee_iterable_iterator() and gee_iterator_get(). Add corresponding g_object_unref() calls. https://bugzilla.gnome.org/show_bug.cgi?id=710453 libempathy-gtk/empathy-individual-menu.c | 51 +++++++++++++++++++++++++++++++++--------------- libempathy-gtk/empathy-individual-widget.c | 4 +++- libempathy-gtk/empathy-roster-model-aggregator.c | 13 +++++++++--- 3 files changed, 48 insertions(+), 20 deletions(-) and 3.10: commit 9419a9b70f97e3617571ea3ce02138105117788a Author: Philip Withnall <philip.withnall@collabora.co.uk> Date: Fri Oct 18 14:26:43 2013 +0100 libempathy: Fix several memory leaks from libgee See commit 039dc326208e02b687e93739434e27a867f4ffa7. https://bugzilla.gnome.org/show_bug.cgi?id=710453 libempathy/empathy-individual-manager.c | 9 ++++++--- libempathy/empathy-utils.c | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) commit c754b1deab91b48e6b203dd2c6f1293a124c66af Author: Philip Withnall <philip.withnall@collabora.co.uk> Date: Fri Oct 18 14:24:15 2013 +0100 libempathy-gtk: Fix several memory leaks from libgee libgee’s GeeIterator returns a new reference from most of its methods, especially gee_iterable_iterator() and gee_iterator_get(). Add corresponding g_object_unref() calls. https://bugzilla.gnome.org/show_bug.cgi?id=710453 libempathy-gtk/empathy-individual-menu.c | 51 +++++++++++++++++++++++++++++++++--------------- libempathy-gtk/empathy-individual-widget.c | 4 +++- libempathy-gtk/empathy-roster-model-aggregator.c | 13 +++++++++--- 3 files changed, 48 insertions(+), 20 deletions(-)