[totem] screensaver: Fix memory leak



commit a59bdebea7cda505b9d423bfc47d5711732b29cb
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Mar 10 16:18:43 2011 +0000

    screensaver: Fix memory leak
    
    Spotted by Philip Withnall

 src/plugins/screensaver/totem-screensaver.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/screensaver/totem-screensaver.c b/src/plugins/screensaver/totem-screensaver.c
index 3a23fb1..1a8e4f9 100644
--- a/src/plugins/screensaver/totem-screensaver.c
+++ b/src/plugins/screensaver/totem-screensaver.c
@@ -106,14 +106,17 @@ impl_activate (PeasActivatable *plugin)
 {
 	TotemScreensaverPlugin *pi = TOTEM_SCREENSAVER_PLUGIN (plugin);
 	TotemObject *totem;
+	GtkWindow *window;
 
 	totem = g_object_get_data (G_OBJECT (plugin), "object");
+	window = totem_get_main_window (totem);
 
 	pi->priv->scr = totem_scrsaver_new ();
 	g_object_set (pi->priv->scr,
 	              "reason", _("Playing a movie"),
-	              "window", totem_get_main_window (totem),
+	              "window", window,
 	              NULL);
+	g_object_unref (window);
 
 	pi->priv->bvw = BACON_VIDEO_WIDGET (totem_get_video_widget (totem));
 



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