[gdm/rhel-7.9: 41/51] libgdm: Fix client leaks from g_async_result_get_source_object
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/rhel-7.9: 41/51] libgdm: Fix client leaks from g_async_result_get_source_object
- Date: Mon, 12 Apr 2021 20:58:10 +0000 (UTC)
commit 6d3d1ff8d2d4b4af20135d63bcf5b75b15d37a0b
Author: Ray Strode <rstrode redhat com>
Date: Sun Sep 27 01:06:37 2020 -0400
libgdm: Fix client leaks from g_async_result_get_source_object
There are are few places in the code where the client object is
retrieved via g_async_result_get_source_object. Those calls
return a fresh reference that is never unreferenced later.
This commit plugs those leaks by using g_autoptr's
libgdm/gdm-client.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libgdm/gdm-client.c b/libgdm/gdm-client.c
index f9e3faee2..66f6102ec 100644
--- a/libgdm/gdm-client.c
+++ b/libgdm/gdm-client.c
@@ -193,7 +193,7 @@ on_user_verifier_choice_list_proxy_created (GObject *source,
GAsyncResult *result,
UserVerifierData *data)
{
- GdmClient *client;
+ g_autoptr(GdmClient) client = NULL;
GdmUserVerifierChoiceList *choice_list;
g_autoptr(GError) error = NULL;
@@ -216,7 +216,7 @@ on_user_verifier_extensions_enabled (GdmUserVerifier *user_verifier,
GAsyncResult *result,
UserVerifierData *data)
{
- GdmClient *client;
+ g_autoptr(GdmClient) client = NULL;
GCancellable *cancellable;
GDBusConnection *connection;
g_autoptr(GError) error = NULL;
@@ -279,7 +279,7 @@ on_user_verifier_proxy_created (GObject *source,
GAsyncResult *result,
gpointer user_data)
{
- GdmClient *self;
+ g_autoptr(GdmClient) self = NULL;
GCancellable *cancellable = NULL;
g_autoptr(GdmUserVerifier) user_verifier = NULL;
g_autoptr(GTask) task = user_data;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]