]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Reintroduce memory leak when using generics in interfaces
authorLuca Bruno <lucabru@src.gnome.org>
Tue, 17 Jan 2012 08:30:31 +0000 (09:30 +0100)
committerLuca Bruno <lucabru@src.gnome.org>
Wed, 18 Jan 2012 17:49:33 +0000 (18:49 +0100)
The bug was present in older Vala versions. Reintroducing it to avoid
breaking old code, until a proper fix is found.

See bug 666480.

codegen/valaccodebasemodule.vala

index 9ff916a42a2b214182781bbdd5e08cbcb05a02c1..5bd6de187364c84df405f36c09d96d2e19f998e7 100644 (file)
@@ -3101,7 +3101,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                if (type.type_parameter != null) {
                        var parent = type.type_parameter.parent_symbol;
                        var cl = parent as Class;
-                       if ((!(parent is Method) && !(parent is ObjectTypeSymbol)) || (cl != null && cl.is_compact)) {
+                       if ((!(parent is Method) && !(parent is ObjectTypeSymbol)) || (cl != null && cl.is_compact) || parent is Interface) {
                                return new CCodeConstant ("NULL");
                        }