[PATCH vkd3d v2 06/10] vkd3d-shader/hlsl: Properly free parse_variable_def memory in declare_vars().
Giovanni Mascellani
gmascellani at codeweavers.com
Tue Jan 11 12:23:33 CST 2022
Hi,
On 11/01/22 18:34, Zebediah Figura (she/her) wrote:
> I'm afraid I don't agree in this case. The principle is fine in general;
> the problem here is that struct parse_variable_def isn't semantically an
> object; it's a collection of information that's grouped into a struct
> only because yacc requires it. The fact that the code ends up using it
> in a relatively piecewise fashion is a good indication of this.
It is of course a completely legitimate point of view, but I think it's
more prone to mistakes: for instance, the many missing calls to free()
that Francisco is fixing.
Also, if we insist in keeping this point of view, then we should remove
free_parse_variable_def(), because that's precisely one of the gadgets
that indicates that the structure is meant to be an encapsulated object.
Giovanni.
More information about the wine-devel
mailing list