]> 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, 13 Mar 2021 20:24:21 +0000 (21:24 +0100)
Found by -fsanitize=address

codegen/valagdbusservermodule.vala

index 6eca1d14a34d001f624f40d24945c94a4434aad1..f0afb3c6a668514e0448a8b2adb2df1f990b61ef 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;
                                }
                        }
                }