Commit 23cc3003 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

d3dcompiler: Iterate through the instruction list in reverse in free_instr_list() (Valgrind).

parent cb8de48f
...@@ -2113,7 +2113,9 @@ void free_instr_list(struct list *list) ...@@ -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);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment