diff options
author | Miloslav Trmač <mitr@redhat.com> | 2017-02-09 19:53:54 +0100 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2017-06-21 22:44:28 +0200 |
commit | 3a1e7fd90fe4525e8e6bbb53781a779936745342 (patch) | |
tree | 0adab248870dcb6045c55a1a8805b5a9d9be6521 | |
parent | 915694d40b1f93e48064a3202fdfe8d2736f064c (diff) | |
download | polkit-3a1e7fd90fe4525e8e6bbb53781a779936745342.tar.gz |
Fix a memory leak per agent authentication
https://bugs.freedesktop.org/show_bug.cgi?id=99741
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
-rw-r--r-- | src/polkitbackend/polkitbackendinteractiveauthority.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/polkitbackend/polkitbackendinteractiveauthority.c b/src/polkitbackend/polkitbackendinteractiveauthority.c index 7511381..270d3ea 100644 --- a/src/polkitbackend/polkitbackendinteractiveauthority.c +++ b/src/polkitbackend/polkitbackendinteractiveauthority.c @@ -1906,15 +1906,15 @@ authentication_agent_begin_cb (GDBusProxy *proxy, AuthenticationSession *session = user_data; gboolean gained_authorization; gboolean was_dismissed; + GVariant *result; GError *error; was_dismissed = FALSE; gained_authorization = FALSE; error = NULL; - if (!g_dbus_proxy_call_finish (proxy, - res, - &error)) + result = g_dbus_proxy_call_finish (proxy, res, &error); + if (result == NULL) { g_printerr ("Error performing authentication: %s (%s %d)\n", error->message, @@ -1926,6 +1926,7 @@ authentication_agent_begin_cb (GDBusProxy *proxy, } else { + g_variant_unref (result); gained_authorization = session->is_authenticated; g_debug ("Authentication complete, is_authenticated = %d", session->is_authenticated); } |