[notification-daemon] Don't leak pixbufs



commit 9dbba0b504fe4674a226ab16347b4e9742b39763
Author: William Jon McCann <jmccann redhat com>
Date:   Fri Oct 29 19:03:52 2010 -0400

    Don't leak pixbufs

 src/nd-bubble.c           |    1 +
 src/nd-notification-box.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/nd-bubble.c b/src/nd-bubble.c
index 7f341f8..0587478 100644
--- a/src/nd-bubble.c
+++ b/src/nd-bubble.c
@@ -881,6 +881,7 @@ add_notification_action (NdBubble       *bubble,
                 GtkWidget *image;
 
                 image = gtk_image_new_from_pixbuf (pixbuf);
+                g_object_unref (pixbuf);
                 g_signal_connect (G_OBJECT (image),
                                   "style-set",
                                   G_CALLBACK (on_style_set),
diff --git a/src/nd-notification-box.c b/src/nd-notification-box.c
index da53f21..352c515 100644
--- a/src/nd-notification-box.c
+++ b/src/nd-notification-box.c
@@ -138,6 +138,7 @@ create_notification_action (NdNotificationBox *box,
                 GtkWidget *image;
 
                 image = gtk_image_new_from_pixbuf (pixbuf);
+                g_object_unref (pixbuf);
                 atk_object_set_name (gtk_widget_get_accessible (GTK_WIDGET (button)),
                                      text);
                 gtk_widget_show (image);



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