mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 00:44:10 +00:00
d3dcompiler: Fix a leak on error path (Coverity).
Signed-off-by: Sven Baars <sbaars@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
16fe2037fb
commit
9f9fec1879
|
@ -1446,7 +1446,7 @@ static BOOL invert_swizzle(unsigned int *swizzle, unsigned int *writemask, unsig
|
|||
struct hlsl_ir_node *add_assignment(struct list *instrs, struct hlsl_ir_node *lhs,
|
||||
enum parse_assign_op assign_op, struct hlsl_ir_node *rhs)
|
||||
{
|
||||
struct hlsl_ir_assignment *assign = d3dcompiler_alloc(sizeof(*assign));
|
||||
struct hlsl_ir_assignment *assign;
|
||||
struct hlsl_type *lhs_type;
|
||||
DWORD writemask = 0;
|
||||
|
||||
|
@ -1459,6 +1459,7 @@ struct hlsl_ir_node *add_assignment(struct list *instrs, struct hlsl_ir_node *lh
|
|||
return NULL;
|
||||
}
|
||||
|
||||
assign = d3dcompiler_alloc(sizeof(*assign));
|
||||
if (!assign)
|
||||
{
|
||||
ERR("Out of memory\n");
|
||||
|
|
Loading…
Reference in a new issue