summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2017-02-09 19:58:12 +0100
committerMiloslav Trmač <mitr@redhat.com>2017-06-21 22:44:28 +0200
commit97e54d502de35f70269deb90ea7fb5b5bf809703 (patch)
tree4646eb7fc9e42f06075d880475864d7d65a11440
parent3a1e7fd90fe4525e8e6bbb53781a779936745342 (diff)
downloadpolkit-gvariant-audit.tar.gz
Fix a memory leak on agent authentication cancellationgvariant-audit
(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.c7
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