[sapwood] plug a memory leak



commit a946b42376e6ea8992472c541b90c6610859eed4
Author: Sven Herzberg <herzi gnome-de org>
Date:   Fri Aug 6 13:20:47 2010 +0200

    plug a memory leak
    
    * engine/theme-pixbuf.c: plug a memory leak that cause GDK to spit out
      warnings about XID collisions (when the SapwoodPixmap wasn't freed
      and thus, the server still had the old pixmap in memory, when we
      already requested a new one)

 engine/theme-pixbuf.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/engine/theme-pixbuf.c b/engine/theme-pixbuf.c
index 45409f2..a94dceb 100644
--- a/engine/theme-pixbuf.c
+++ b/engine/theme-pixbuf.c
@@ -55,8 +55,10 @@ theme_pixbuf_destroy (ThemePixbuf *theme_pb)
   if (theme_pb->shared)
     {
       g_hash_table_remove (pixbuf_hash, theme_pb);
-      if (theme_pb->pixmap)
-	sapwood_pixmap_free (theme_pb->pixmap);
+    }
+  if (theme_pb->pixmap)
+    {
+      sapwood_pixmap_free (theme_pb->pixmap);
     }
   if (theme_pb->basename)
     g_free (theme_pb->basename);
@@ -455,3 +457,5 @@ theme_pixbuf_render (ThemePixbuf  *theme_pb,
 
   return TRUE;
 }
+
+/* vim:set et sw=2 cino=t0,f0,(0,{s,>2s,n-1s,^-1s,e2s: */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]