[Bug 785828] Re: memory leak in label_notify_cb
Martin Pitt
martin.pitt at ubuntu.com
Wed Aug 17 13:01:53 UTC 2011
Thanks Michael! This package explicitly has format 1.0 and already has
inline patches, so inline patching is fine for this SRU.
Sponsored with corrected upload target, subscribed ubuntu-sru.
** Changed in: libdbusmenu (Ubuntu Natty)
Status: New => Fix Committed
--
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/785828
Title:
memory leak in label_notify_cb
Status in DBus Menu:
Fix Released
Status in DBus Menu 0.4 series:
Fix Released
Status in DBus Menu 0.5 series:
Fix Released
Status in “libdbusmenu” package in Ubuntu:
Fix Released
Status in “libdbusmenu” source package in Natty:
Fix Committed
Status in “libdbusmenu” source package in Oneiric:
Fix Released
Bug description:
http://bazaar.launchpad.net/~dbusmenu-team/dbusmenu/trunk/view/head:/libdbusmenu-gtk/parser.c
Line 830:
g_object_get_property (G_OBJECT (widget), pspec->name, &prop_value);
According to the documentation, g_object_get property allocates memory
that must be freed using g_value_unset().
http://www.gtk.org/api/2.6/gobject/gobject-The-Base-Object-Type.html#g
-object-get-property
This never happens, causing a memory leak. Below is a valgrind log
illustrating the problem. Note the line numbers are slightly different
than the line numbers in trunk, but it seems clear what the problem
is.
==4864== 790 bytes in 100 blocks are definitely lost in loss record 4,263 of 4,374
==4864== at 0x4C28FAC: malloc (vg_replace_malloc.c:236)
==4864== by 0x77D4A62: g_malloc (gmem.c:164)
==4864== by 0x77ED06D: g_strdup (gstrfuncs.c:102)
==4864== by 0x6F6313F: g_value_set_string (gvaluetypes.c:999)
==4864== by 0x6F3F26B: g_object_get_property (gobject.c:1131)
==4864== by 0xB36AA25: label_notify_cb (parser.c:837)
...rest of trace omitted
To manage notifications about this bug go to:
https://bugs.launchpad.net/dbusmenu/+bug/785828/+subscriptions
More information about the Ubuntu-sponsors
mailing list