vkd3d-shader/d3dbc: Free vkd3d_bytecode_buffer data on failure.

This commit is contained in:
Zebediah Figura 2023-07-27 00:42:46 -05:00 committed by Alexandre Julliard
parent 1bd873fb2b
commit 6e370777b4
Notes: Alexandre Julliard 2023-08-02 21:24:14 +09:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/288

View File

@ -2460,5 +2460,9 @@ int hlsl_sm1_write(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *entry_fun
out->code = buffer.data;
out->size = buffer.size;
}
else
{
vkd3d_free(buffer.data);
}
return ret;
}