From: Carlos Garnacho Date: Mon, 6 Mar 2017 12:17:40 +0000 (+0100) Subject: codegen: Avoid early return on sync dbus methods returning an error X-Git-Tag: 0.35.7~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00d0c7d659adee4a9388acfc478ae4f55fb6d29f;p=thirdparty%2Fvala.git codegen: Avoid early return on sync dbus methods returning an error If there are arguments that need freeing, we need to fall through the _error label, if there is any. https://bugzilla.gnome.org/show_bug.cgi?id=778540 --- diff --git a/codegen/valagdbusservermodule.vala b/codegen/valagdbusservermodule.vala index 2cb42710e..d0c87fd64 100644 --- a/codegen/valagdbusservermodule.vala +++ b/codegen/valagdbusservermodule.vala @@ -240,7 +240,11 @@ public class Vala.GDBusServerModule : GDBusClientModule { return_error.add_argument (new CCodeIdentifier ("error")); ccode.add_expression (return_error); - ccode.add_return (); + if (need_goto_label) { + ccode.add_goto ("_error"); + } else { + ccode.add_return (); + } ccode.close (); }