Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.y:
list_move_tail(&body_block.instrs, iter);
list_move_tail(&body->instrs, iter);
if (type == LOOP_DO_WHILE)
list_move_tail(&body_block.instrs, cond);
list_move_tail(&body->instrs, cond);
- else
list_move_head(&body->instrs, cond);
- if (!(loop = hlsl_new_loop(ctx, &body_block, loc)))
if (!(loop = hlsl_new_loop(ctx, body, loc))) goto oom; list_add_tail(init, &loop->entry);
vkd3d_free(cond); vkd3d_free(body);
`destroy_block()` here too.
Also, shouldn't you free `iter` too?