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

Alexandre Julliard julliard at winehq.org
Mon Jan 24 16:14:12 CST 2022


Module: vkd3d
Branch: master
Commit: 5e14b843eae465a628ea3d439e39f09d15da6b32
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=5e14b843eae465a628ea3d439e39f09d15da6b32

Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Fri Jan 21 22:22:25 2022 +0100

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

Spotted by Giovanni Mascellani.

Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 libs/vkd3d-shader/hlsl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c
index 8ae3130..a287974 100644
--- a/libs/vkd3d-shader/hlsl.c
+++ b/libs/vkd3d-shader/hlsl.c
@@ -265,7 +265,7 @@ struct hlsl_type *hlsl_new_texture_type(struct hlsl_ctx *ctx, enum hlsl_sampler_
 {
     struct hlsl_type *type;
 
-    if (!(type = vkd3d_calloc(1, sizeof(*type))))
+    if (!(type = hlsl_alloc(ctx, sizeof(*type))))
         return NULL;
     type->type = HLSL_CLASS_OBJECT;
     type->base_type = HLSL_TYPE_TEXTURE;




More information about the wine-cvs mailing list