[Bug 785828] [NEW] memory leak in label_notify_cb
Launchpad Bug Tracker
785828 at bugs.launchpad.net
Wed Aug 17 12:29:34 UTC 2011
You have been subscribed to a public bug by Michael Hofmann (mh21):
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
** Affects: dbusmenu
Importance: Undecided
Status: Fix Released
** Affects: dbusmenu/0.4
Importance: Undecided
Status: Fix Released
** Affects: dbusmenu/0.5
Importance: Undecided
Status: Fix Released
** Affects: libdbusmenu (Ubuntu)
Importance: Undecided
Status: Fix Released
** Affects: libdbusmenu (Ubuntu Natty)
Importance: Undecided
Status: New
** Affects: libdbusmenu (Ubuntu Oneiric)
Importance: Undecided
Status: Fix Released
--
memory leak in label_notify_cb
https://bugs.launchpad.net/bugs/785828
You received this bug notification because you are a member of Ubuntu Sponsors Team, which is subscribed to the bug report.
More information about the Ubuntu-sponsors
mailing list