panfrost: free allocations in schedule_block
authorUrja Rannikko <urjaman@gmail.com>
Fri, 6 Dec 2019 01:20:34 +0000 (01:20 +0000)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 6 Dec 2019 15:26:13 +0000 (15:26 +0000)
Signed-off-by: Urja Rannikko <urjaman@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/panfrost/midgard/midgard_schedule.c

index b2f90e388228c5aa25d81f28e78aaca657494d63..5e6ac15e539fb11e7209ed0e8d1eb24cae7e8767 100644 (file)
@@ -1094,6 +1094,9 @@ schedule_block(compiler_context *ctx, midgard_block *block)
         mir_foreach_instr_in_block_scheduled_rev(block, ins) {
                 list_add(&ins->link, &block->instructions);
         }
+
+       free(instructions); /* Allocated by flatten_mir() */
+       free(worklist);
 }
 
 /* When we're 'squeezing down' the values in the IR, we maintain a hash