Module: vkd3d Branch: master Commit: a10de1b239f543dafd555d341a00efc7a1324a7b URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/a10de1b239f543dafd555d341a00ef...
Author: Giovanni Mascellani gmascellani@codeweavers.com Date: Thu Feb 1 12:46:01 2024 +0100
vkd3d-shader/hlsl: Free the individual attributes in func_prototype (Valgrind).
---
libs/vkd3d-shader/hlsl.y | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 6249808a..06aa51a8 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -5807,7 +5807,11 @@ func_prototype: } else { - free($1.attrs); + unsigned int i; + + for (i = 0; i < $1.count; ++i) + hlsl_free_attribute((void *)$1.attrs[i]); + vkd3d_free($1.attrs); } $$ = $2; }