libindicate, libdbusmenu, indicator-messages-service memleaks

Bug #690668 reported by Chow Loong Jin on 2010-12-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DBus Menu
Fix Released
Undecided
Unassigned
Messaging Menu
Fix Released
Undecided
Unassigned
Unity Foundations
Undecided
Unassigned
libindicate
Fix Released
Undecided
Unassigned

Bug Description

  affects libindicate
  affects dbusmenu
  affects indicator-messages

As per the title, these projects leak memory. dbus_g_proxy_end_call requires you
to free the memory it allocates, including the GErrors. The patch attached does
that.

indicator-messages has an additional leak, which I'm not sure is libdbusmenu's
or indicator-messages' fault. libdbusmenu passes a GdkPixbuf into
indicator-messages, indicator-messages scales it and doesn't free the original
pixbuf. However, libdbusmenu doesn't free those pixbufs either, so it gets
leaked. The same thing happened with indicator-sound, but the patch for that has
already been committed.

These patches are by no means complete. I'm just hunting down memleaks one by
one using Valgrind's massif, and targeting functions that allocate too much memory.

--
Kind regards,
Loong Jin

Related branches

Chow Loong Jin (hyperair) wrote :
description: updated
Chow Loong Jin (hyperair) wrote :

Updated dbusmenu and libindicate patches to free GValues as well. I think the dbusmenu one is particularly prominent -- the GHashTable doesn't free the GValue for you if you don't give it a freeing function.

Chow Loong Jin (hyperair) wrote :
Alex Launi (alexlauni) wrote :

The dbusmenu patch no longer applies, libindicate seems to have been fixed already. Indicator messages still looks useful though. I will ping Ted to give it a more thorough reviewing.

Changed in indicator-messages:
status: New → In Progress
Changed in dbusmenu:
status: New → Incomplete
Changed in libindicate:
status: New → Incomplete
Ted Gould (ted) wrote :

The dbusmenu one didn't apply, but I went through and tried to get the heart of the changes. I pushed that into this branch:

  lp:~ted/dbusmenu/mem-leaks

I also adapted the libindicate patch and pushed it here:

  lp:~ted/libindicate/mem-leak

And the indicator messages one applied cleanly (with fuzz):

  lp:~ted/indicator-messages/mem-leaks

Changed in dbusmenu:
status: Incomplete → In Progress
Changed in libindicate:
status: Incomplete → In Progress
Ted Gould (ted) on 2011-09-20
Changed in libindicate:
status: In Progress → Fix Committed
milestone: none → 0.5.92
Ted Gould (ted) on 2011-09-20
Changed in libindicate:
milestone: 0.5.92 → 0.6.0
Changed in unity-foundations:
status: New → In Progress
milestone: none → oneiric-beta-2
Ted Gould (ted) on 2011-09-20
Changed in libindicate:
status: Fix Committed → Fix Released
Ted Gould (ted) on 2011-09-20
Changed in dbusmenu:
status: In Progress → Fix Released
Ted Gould (ted) on 2011-09-21
Changed in unity-foundations:
milestone: oneiric-beta-2 → oneiric-final
Ted Gould (ted) on 2011-09-21
Changed in indicator-messages:
status: In Progress → Fix Committed
milestone: none → 0.4.96
Changed in unity-foundations:
status: In Progress → Fix Committed
Ted Gould (ted) on 2011-09-28
Changed in indicator-messages:
milestone: 0.4.96 → 0.5.0
status: Fix Committed → Fix Released
Ted Gould (ted) on 2011-09-28
Changed in unity-foundations:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers