glsl_to_tgsi: Fix potential leak
Reported by Coverity: arr_live_ranges is freed in a different branch than the one in which it was allocated. Signed-off-by: Ernestas Kulik <ernestas.kulik@gmail.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
committed by
Marek Olšák
parent
ea1e50cc16
commit
d49904085a
@@ -5616,10 +5616,11 @@ glsl_to_tgsi_visitor::merge_registers(void)
|
||||
|
||||
this->next_array = merge_arrays(this->next_array, this->array_sizes,
|
||||
&this->instructions, arr_live_ranges);
|
||||
|
||||
if (arr_live_ranges)
|
||||
delete[] arr_live_ranges;
|
||||
}
|
||||
|
||||
if (arr_live_ranges)
|
||||
delete[] arr_live_ranges;
|
||||
|
||||
ralloc_free(reg_live_ranges);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user