diff options
author | Miloslav Trmač <mitr@redhat.com> | 2017-02-09 19:58:12 +0100 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2018-04-03 13:13:40 -0400 |
commit | 1458aaa10fed2c782717cf187b3d6ad92172cb8b (patch) | |
tree | 1d3be039a310100e37e66efae14ad6a9ca02ca34 | |
parent | a0e7b2ed767c74bfde924e3d87f7ef3e0d6deb8e (diff) | |
download | polkit-1458aaa10fed2c782717cf187b3d6ad92172cb8b.tar.gz |
Fix a memory leak on agent authentication cancellation
(This is cancellation by the daemon, possibly requested by the client, not by the agent.)
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, 6 insertions, 1 deletions
diff --git a/src/polkitbackend/polkitbackendinteractiveauthority.c b/src/polkitbackend/polkitbackendinteractiveauthority.c index 270d3ea..1cd60d3 100644 --- a/src/polkitbackend/polkitbackendinteractiveauthority.c +++ b/src/polkitbackend/polkitbackendinteractiveauthority.c @@ -2437,13 +2437,18 @@ authentication_agent_cancel_cb (GDBusProxy *proxy, GAsyncResult *res, gpointer user_data) { + GVariant *result; GError *error; + 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 cancelling authentication: %s\n", error->message); g_error_free (error); } + else + g_variant_unref (result); } static void |