]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gdbus: Don't leak memory of deserialized arguments on error in wrapper method
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 6 Mar 2021 13:06:10 +0000 (14:06 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sat, 6 Mar 2021 13:25:17 +0000 (14:25 +0100)
Found by -fsanitize=address

codegen/valagdbusservermodule.vala

index 06166772ece2bfffd2c2c26aa4c3ea783f91d8f8..68ca2b7fb12c0175e1945eb85cdbc94a6d79ddd7 100644 (file)
@@ -193,6 +193,8 @@ public class Vala.GDBusServerModule : GDBusClientModule {
                                        }
 
                                        ccode.close ();
+                               } else if (!need_goto_label && m.tree_can_fail && requires_destroy (owned_type)) {
+                                       need_goto_label = true;
                                }
                        }
                }