[PATCH vkd3d 1/6] vkd3d-shader/hlsl: Properly free parse_variable_def memory in declare_vars().

Giovanni Mascellani gmascellani at codeweavers.com
Thu Feb 24 14:04:23 CST 2022


Hi,

Il 24/02/22 15:07, Matteo Bruni ha scritto:
> Splitting off the function or otherwise simplifying the code are
> options on the table, sure. It's not that clear to me how to do that
> in a sensible manner though (not that I tried very hard to think about
> it).

I gave my proposal in 
https://www.winehq.org/pipermail/wine-devel/2022-January/204393.html. 
Basically, the idea is to always free the fields of struct 
parse_variable_def in a single function, appropriately marking those 
that have reused elsewhere (for example setting them to NULL) to avoid 
freeing stuff that is still in use.

Giovanni.



More information about the wine-devel mailing list