[gnome-online-accounts] identity: Don't leak operation_result when handling ExchangeSecretKeys
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts] identity: Don't leak operation_result when handling ExchangeSecretKeys
- Date: Tue, 10 Jan 2017 14:24:54 +0000 (UTC)
commit 588b093ab44b51644ce438709ce74c3232206a67
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Jan 5 15:23:58 2017 +0100
identity: Don't leak operation_result when handling ExchangeSecretKeys
The lifecycle of operation_result is controlled by the g_bus_watch_name
call and the watched_client_connections hash table. Therefore, we
should not unref it when there is an error in on_caller_watched. What
we should do is drop our reference to it right after starting to watch
the bus.
https://bugzilla.gnome.org/show_bug.cgi?id=776897
src/goaidentity/goaidentityservice.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/goaidentity/goaidentityservice.c b/src/goaidentity/goaidentityservice.c
index 93913c9..8d4bc21 100644
--- a/src/goaidentity/goaidentityservice.c
+++ b/src/goaidentity/goaidentityservice.c
@@ -565,7 +565,6 @@ on_caller_watched (GDBusConnection *connection,
GCR_ERROR_UNRECOGNIZED,
_("Initial secret key is invalid"));
g_simple_async_result_complete_in_idle (operation_result);
- g_object_unref (operation_result);
return;
}
@@ -643,6 +642,7 @@ goa_identity_service_handle_exchange_secret_keys (GoaIdentityServiceManager *man
g_strdup (sender),
GUINT_TO_POINTER (watch_id));
+ g_object_unref (operation_result);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]