glsl: free uniform_map on failure path.
If we fails in reserve_explicit_locations, we leak uniform_map. Reported-by: coverity scanner. Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -2439,8 +2439,10 @@ check_explicit_uniform_locations(struct gl_context *ctx,
|
||||
ir_variable *var = node->as_variable();
|
||||
if ((var && var->data.mode == ir_var_uniform) &&
|
||||
var->data.explicit_location) {
|
||||
if (!reserve_explicit_locations(prog, uniform_map, var))
|
||||
if (!reserve_explicit_locations(prog, uniform_map, var)) {
|
||||
delete uniform_map;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user