Verified Commit f4ecd91a authored by David Sommerseth's avatar David Sommerseth
Browse files

client: Fix incorrect return in the Ready D-Bus method

If the net.openvpn.v3.backends.Ready method call throws a D-Bus
exception, it would first call g_dbus_method_invocation_return_gerror()
and then call g_dbus_method_invocation_return_value(invoc, NULL) later
in the callback method.  This results in the following errors in the

  dbus[1665]: [system] Rejected send message, 0 matched rules; type="method_return", sender=":1.573" (uid=989 pid=21817 comm="/usr/local/openvpn-dev/libexec/openvpn3-linux/open") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.150" (uid=989 pid=6527 comm="/usr/local/openvpn-dev/libexec/openvpn3-linux/open")
  (process:21817): GLib-GObject-CRITICAL **: 20:25:46.794: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

The proper fix is to return from the callback method right after calling
the g_dbus_method_invocation_return_gerror() call.

Trac: #1180
Signed-off-by: David Sommerseth's avatarDavid Sommerseth <>
parent d54718ee
......@@ -344,6 +344,7 @@ public:
"Missing user credentials");
g_dbus_method_invocation_return_gerror(invoc, err);
else if ("Connect" == method_name)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment