mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 18:30:09 +01:00
glsl: fix deref_hash memory leak in constant_expression_value
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
ca9977d5c6
commit
ea055e19c2
1 changed files with 5 additions and 2 deletions
|
|
@ -1322,8 +1322,11 @@ ir_function_signature::constant_expression_value(exec_list *actual_parameters, s
|
|||
|
||||
foreach_list(n, actual_parameters) {
|
||||
ir_constant *constant = ((ir_rvalue *) n)->constant_expression_value(variable_context);
|
||||
if (constant == NULL)
|
||||
return NULL;
|
||||
if (constant == NULL) {
|
||||
hash_table_dtor(deref_hash);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
ir_variable *var = (ir_variable *)parameter_info;
|
||||
hash_table_insert(deref_hash, constant, var);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue