mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 22:28:30 +00:00
d3dcompiler: Iterate through the instruction list in reverse in free_instr_list() (Valgrind).
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
cb8de48f77
commit
23cc300372
|
@ -2113,7 +2113,9 @@ void free_instr_list(struct list *list)
|
||||||
|
|
||||||
if (!list)
|
if (!list)
|
||||||
return;
|
return;
|
||||||
LIST_FOR_EACH_ENTRY_SAFE(node, next_node, list, struct hlsl_ir_node, entry)
|
/* Iterate in reverse, to avoid use-after-free when unlinking sources from
|
||||||
|
* the "uses" list. */
|
||||||
|
LIST_FOR_EACH_ENTRY_SAFE_REV(node, next_node, list, struct hlsl_ir_node, entry)
|
||||||
free_instr(node);
|
free_instr(node);
|
||||||
d3dcompiler_free(list);
|
d3dcompiler_free(list);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue