diff options
author | Patrick Lerda <[email protected]> | 2019-04-29 10:43:51 +0200 |
---|---|---|
committer | noblock <[email protected]> | 2019-04-29 10:43:51 +0200 |
commit | 812288bf0f65c360fd93803d14f1c74754835535 (patch) | |
tree | b1c6602912543aa46a6d1463318c13db83bba37d | |
parent | bb953de96c769618db649b0bb735a5cce3934460 (diff) |
lima/ppir: fix pointer referenced after a free
Issue detected by valgrind.
Fixes: 92d7ca4b1cd ("gallium: add lima driver")
Signed-off-by: Patrick Lerda <[email protected]>
Reviewed-by: Qiang Yu <[email protected]>
-rw-r--r-- | src/gallium/drivers/lima/ir/pp/lower.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/lima/ir/pp/lower.c b/src/gallium/drivers/lima/ir/pp/lower.c index e294f6740d1..97243dcfa3f 100644 --- a/src/gallium/drivers/lima/ir/pp/lower.c +++ b/src/gallium/drivers/lima/ir/pp/lower.c @@ -94,8 +94,9 @@ static bool ppir_lower_dot(ppir_block *block, ppir_node *node) dest->write_mask = u_bit_consecutive(0, num_components); ppir_node_foreach_pred_safe(node, dep) { + ppir_node *pred = dep->pred; ppir_node_remove_dep(dep); - ppir_node_add_dep(&mul->node, dep->pred); + ppir_node_add_dep(&mul->node, pred); } ppir_node_add_dep(node, &mul->node); |