dbus: Move send_message() call before _error label
commitb3e04860257be7a7b32b977e215b3b0ca9c78992
authorCarlos Garnacho <carlosg@gnome.org>
Sat, 18 Feb 2017 14:27:13 +0000 (18 15:27 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sat, 18 Feb 2017 18:25:25 +0000 (18 19:25 +0100)
tree562e578955fc20bc842f09641d34d1f15e310818
parente650e2542386119c59dee3570ab75210d8bc7ffd
dbus: Move send_message() call before _error label

Commit 09e6818d01 changed dbus server paths so requests fell back
to freeing allocated memory on errors. However certain kinds of
dbus replies issue a final g_dbus_connection_send_message() there.

In case of errors, _reply_message will be NULL, and the error paths
would have already issued g_dbus_method_invocation_return_gerror(),
so the g_dbus_connection_send_message() call is both unnecessary and
warns on the NULL argument. So  move the DBus reply before the _error
label.

https://bugzilla.gnome.org/show_bug.cgi?id=778540
codegen/valagdbusservermodule.vala