diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-04-11 18:05:08 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-04-11 18:05:38 +0200 |
commit | c9c7c782f02843061fa9d13dfba917ad8f295272 (patch) | |
tree | 1eb143f60ba3778fc6a188c2d6dd5ec49f8fbbaf /codegen | |
parent | f5203f73468b33b3d343d4b863e3e4eea2e8a295 (diff) | |
download | vala-c9c7c782f02843061fa9d13dfba917ad8f295272.tar.gz |
codegen: Don't free temp-var for element-access to array with boxed structs
Check the symbol_reference of inner element-access as needed.
Regression of 63551acaf0d83fac8b50904c2759c1098fbfaa71
Fixes https://gitlab.gnome.org/GNOME/vala/issues/1174
Diffstat (limited to 'codegen')
-rw-r--r-- | codegen/valaccodebasemodule.vala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala index fc25b327f..4ea6794c4 100644 --- a/codegen/valaccodebasemodule.vala +++ b/codegen/valaccodebasemodule.vala @@ -5477,6 +5477,9 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator { while (inner_expr is CastExpression) { inner_expr = ((CastExpression) inner_expr).inner; } + if (inner_expr is ElementAccess) { + inner_expr = ((ElementAccess) inner_expr).container; + } if (!(inner_expr.symbol_reference is Variable)) { // heap allocated struct leaked, destroy it var value = new GLibValue (new PointerType (new VoidType ()), innercexpr); |