[rhythmbox] power-manager: unref dbus call result variants properly



commit 7df48bbb4093a1baf0f61c9d424ff013f6d85d48
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sun Feb 27 09:06:06 2011 +1000

    power-manager: unref dbus call result variants properly

 plugins/power-manager/rb-power-manager-plugin.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/plugins/power-manager/rb-power-manager-plugin.c b/plugins/power-manager/rb-power-manager-plugin.c
index 17ab5ba..ade0c06 100644
--- a/plugins/power-manager/rb-power-manager-plugin.c
+++ b/plugins/power-manager/rb-power-manager-plugin.c
@@ -146,9 +146,9 @@ inhibit_done (GObject *proxy, GAsyncResult *res, RBGPMPlugin *plugin)
 	} else {
 		g_variant_get (result, "(u)", &plugin->cookie);
 		rb_debug ("inhibited, got cookie %u", plugin->cookie);
-	}
 
-	g_variant_unref (result);
+		g_variant_unref (result);
+	}
 }
 
 static gboolean
@@ -205,6 +205,8 @@ uninhibit_done (GObject *proxy, GAsyncResult *res, RBGPMPlugin *plugin)
 	} else {
 		rb_debug ("uninhibited");
 		plugin->cookie = 0;
+
+		g_variant_unref (result);
 	}
 }
 



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