vkd3d-shader/hlsl: Use hlsl_alloc() in hlsl_new_texture_type().

Spotted by Giovanni Mascellani.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Matteo Bruni 2022-01-21 22:22:25 +01:00 committed by Alexandre Julliard
parent 5d627d6c64
commit 5e14b843ea

View File

@ -265,7 +265,7 @@ struct hlsl_type *hlsl_new_texture_type(struct hlsl_ctx *ctx, enum hlsl_sampler_
{ {
struct hlsl_type *type; struct hlsl_type *type;
if (!(type = vkd3d_calloc(1, sizeof(*type)))) if (!(type = hlsl_alloc(ctx, sizeof(*type))))
return NULL; return NULL;
type->type = HLSL_CLASS_OBJECT; type->type = HLSL_CLASS_OBJECT;
type->base_type = HLSL_TYPE_TEXTURE; type->base_type = HLSL_TYPE_TEXTURE;