[gpm] Memory Leak
- From: sbrun sbrun <sbrunau gmail com>
- To: gnome-power-manager-list gnome org
- Subject: [gpm] Memory Leak
- Date: Sat, 3 Jul 2010 22:43:42 +1000
I have been investigating a bug in Ubuntu, and have finally found the
root cause, and a way to reproduce the leak in the unpatched version
The bug in Ubuntu is
The bug is reproduced by continually right/left clicking on the
battery icon. While doing this, approximately 4kB of data will be
leaked for each click.
The problem is caused by gpm_tray_icon_popup_menu_cb() and
gpm_tray_icon_activate_cb() calling gpm_tray_icon_popup_menu() then
gpm_tray_icon_create_menu() regenerates the menus every time it is
called, but not freeing the old one.
In Ubuntu the leak is really bad since the menu is updated on every
battery status change. The Ubuntu patches make the problem occur more
quickly, but the leak is in the core code.
] [Thread Prev