From e53d3bd87c6ab976c39e5e7839d424ebe0c2a315 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Sun, 9 Oct 2011 10:37:46 -0400 Subject: Make sure to reference the variant, and unref the value we get --- src/apt-watcher.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/apt-watcher.c b/src/apt-watcher.c index d8bb7e2..481029a 100644 --- a/src/apt-watcher.c +++ b/src/apt-watcher.c @@ -425,7 +425,7 @@ static void apt_watcher_signal_cb ( GDBusProxy* proxy, g_return_if_fail (APT_IS_WATCHER (user_data)); AptWatcher* self = APT_WATCHER (user_data); - g_variant_ref (parameters); + g_variant_ref_sink (parameters); GVariant *value = g_variant_get_child_value (parameters, 0); if (g_strcmp0(signal_name, "ActiveTransactionsChanged") == 0){ @@ -477,6 +477,7 @@ static void apt_watcher_signal_cb ( GDBusProxy* proxy, } } + g_variant_unref (value); g_variant_unref (parameters); } -- cgit v1.2.3 From e3e555ae3757fa92df7d29b222ccff308fa76ae6 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Sun, 9 Oct 2011 10:39:05 -0400 Subject: Don't unref the parameters as we don't make a ref to it --- src/apt-transaction.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/apt-transaction.c b/src/apt-transaction.c index 317d74a..2b3f5a4 100644 --- a/src/apt-transaction.c +++ b/src/apt-transaction.c @@ -232,7 +232,6 @@ apt_transaction_receive_signal (GDBusProxy * proxy, 0, current_state); } - g_variant_unref (parameters); } static void -- cgit v1.2.3 -- cgit v1.2.3