After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 105148 - Leaks in the panel
Leaks in the panel
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: panel
2.2.x
Other Linux
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-02-03 19:34 UTC by Kjartan Maraas
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.1/2.2


Attachments
leaks in the panel part two (3.04 KB, text/plain)
2003-02-03 19:34 UTC, Kjartan Maraas
  Details
part one (2.44 KB, text/plain)
2003-02-03 19:35 UTC, Kjartan Maraas
  Details
patch to fix leak of the background (515 bytes, patch)
2003-02-18 23:26 UTC, Kjartan Maraas
none Details | Review

Description Kjartan Maraas 2003-02-03 19:34:26 UTC
Attaching a couple of leak traces from valgrind. The major one is when
autohiding a panel with translparent background. It seems to leak the
background pixbuf every time it autohides.
Comment 1 Kjartan Maraas 2003-02-03 19:34:53 UTC
Created attachment 14068 [details]
leaks in the panel part two
Comment 2 Kjartan Maraas 2003-02-03 19:35:26 UTC
Created attachment 14069 [details]
part one
Comment 3 Kjartan Maraas 2003-02-03 19:36:25 UTC
I tried looking at the one with the pixbuf being leaked, but I
couldn't find where to unref it. Hairy code - or mediocre leakhunter.
Pick a choice... :-)
Comment 4 Havoc Pennington 2003-02-18 17:06:34 UTC
It looks to me like 
panel_background_composite() fills in background->composited_image
for BACK_COLOR, but free_composited_resources() only frees that 
field for BACK_IMAGE. Mark maybe you can check that.
Comment 5 Kjartan Maraas 2003-02-18 23:25:46 UTC
Mark, does this patch look ok?
Comment 6 Kjartan Maraas 2003-02-18 23:26:29 UTC
Created attachment 14427 [details] [review]
patch to fix leak of the background
Comment 7 Mark McLoughlin 2003-02-18 23:34:19 UTC
Actually, I think its safe to take out the branch altogether ...
Comment 8 Kjartan Maraas 2003-02-18 23:55:21 UTC
You mean just remove the

if (background->type ....)
    return;

test?
Comment 9 Mark McLoughlin 2003-02-19 00:03:05 UTC
Sorry - yeah, that's what I meant.
Comment 10 Kjartan Maraas 2003-04-22 15:38:01 UTC
This has been applied I think.

2003-02-18  Kjartan Maraas  <kmaraas@gnome.org>
                                                                     
          
        * gnome-run.c: (find_icon_timeout), (selection_changed),
        (add_icon_idle): Fix leaks.
        * menu.c: (make_panel_submenu): Don't leak the applet_list.
        * panel-background.c: (free_composited_resources):Free the
        background even if it's just a color