mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Properly free new store node memory if init_deref() fails.
This commit is contained in:
parent
3857ca06fa
commit
6f6ba8aa56
Notes:
Alexandre Julliard
2022-11-10 22:56:31 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/42
@ -885,7 +885,10 @@ struct hlsl_ir_store *hlsl_new_store_index(struct hlsl_ctx *ctx, const struct hl
|
||||
init_node(&store->node, HLSL_IR_STORE, NULL, loc);
|
||||
|
||||
if (!init_deref(ctx, &store->lhs, lhs->var, lhs->path_len + !!idx))
|
||||
{
|
||||
vkd3d_free(store);
|
||||
return NULL;
|
||||
}
|
||||
for (i = 0; i < lhs->path_len; ++i)
|
||||
hlsl_src_from_node(&store->lhs.path[i], lhs->path[i].node);
|
||||
if (idx)
|
||||
|
Loading…
Reference in New Issue
Block a user