diff audacious/widgets/playlist_list.c @ 1902:e549a118c972 trunk

[svn] - fix memory leak once and for bloody all
author nenolod
date Tue, 24 Oct 2006 13:17:19 -0700
parents e08527b44c20
children 1abdcfc557d8
line wrap: on
line diff
--- a/audacious/widgets/playlist_list.c	Tue Oct 24 01:30:49 2006 -0700
+++ b/audacious/widgets/playlist_list.c	Tue Oct 24 13:17:19 2006 -0700
@@ -119,6 +119,8 @@
 			ximg, ximg->bpl, w, h, 60, 60, 60, shade_color->pixel);
 
 		gdk_draw_image(p, gc, ximg, 0, 0, x, y, w, h);
+
+		g_object_unref(ximg);
 	}
 	else {
 		cfg.playlist_transparent = FALSE;
@@ -175,13 +177,11 @@
 static GdkFilterReturn
 root_event_cb (GdkXEvent *xev, GdkEventProperty *event, gpointer data)
 {
-        static Atom at = None;
         XEvent *xevent = (XEvent *)xev;
 
         if (xevent->type == PropertyNotify)
         {
-                if (at == None)
-                        at = XInternAtom (xevent->xproperty.display, "_XROOTPMAP_ID", True);
+	        Atom at = XInternAtom (xevent->xproperty.display, "_XROOTPMAP_ID", True);
 
                 if (at == xevent->xproperty.atom)
 		{