broadcom/compiler: free defin and defout arrays if they already exist

Just like we do for everything else here, since we are going to realloc
them again right below. Notice this is not exactly a memory leak, since
all these arrays are allocated with ralloc using v3d_compile as context,
so all allocations will be eventually freed when the context is destroyed.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24001>
This commit is contained in:
Iago Toral Quiroga 2023-07-05 10:40:34 +02:00 committed by Marge Bot
parent b9de7da421
commit dcc6288a13

View file

@ -306,6 +306,8 @@ vir_calculate_live_intervals(struct v3d_compile *c)
vir_for_each_block(block, c) {
ralloc_free(block->def);
ralloc_free(block->defin);
ralloc_free(block->defout);
ralloc_free(block->use);
ralloc_free(block->live_in);
ralloc_free(block->live_out);