[gnome-online-accounts/gnome-3-26] kerberos: Don't leak the GcrPrompt
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/gnome-3-26] kerberos: Don't leak the GcrPrompt
- Date: Tue, 7 Nov 2017 16:48:36 +0000 (UTC)
commit d602bb918936ba8ddcc884df4cbbd50166201d6a
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Nov 7 15:59:19 2017 +0100
kerberos: Don't leak the GcrPrompt
src/goabackend/goakerberosprovider.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/goabackend/goakerberosprovider.c b/src/goabackend/goakerberosprovider.c
index 79f1910..3fb197f 100644
--- a/src/goabackend/goakerberosprovider.c
+++ b/src/goabackend/goakerberosprovider.c
@@ -956,7 +956,7 @@ on_system_prompt_open_for_initial_sign_in (GcrSystemPrompt *system_prompt,
GTask *operation_result)
{
GCancellable *cancellable;
- GcrPrompt *prompt;
+ GcrPrompt *prompt = NULL;
GError *error;
cancellable = g_task_get_cancellable (operation_result);
@@ -967,8 +967,7 @@ on_system_prompt_open_for_initial_sign_in (GcrSystemPrompt *system_prompt,
{
g_task_return_error (operation_result, error);
g_object_unref (operation_result);
-
- return;
+ goto out;
}
gcr_prompt_set_title (prompt, _("Log In to Realm"));
@@ -980,6 +979,9 @@ on_system_prompt_open_for_initial_sign_in (GcrSystemPrompt *system_prompt,
(GAsyncReadyCallback)
on_system_prompt_answered_for_initial_sign_in,
operation_result);
+
+ out:
+ g_clear_object (&prompt);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]