On 30.07.2017 00:53, Eric Engestrom wrote:
CID: 1415909
Fixes: 7a34a0e8903249c41fae "ra: Add a callback for selecting a register
                              from what's available."
Signed-off-by: Eric Engestrom <e...@engestrom.ch>
---
  src/util/register_allocate.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/src/util/register_allocate.c b/src/util/register_allocate.c
index b06a61f24a..f6475b6b93 100644
--- a/src/util/register_allocate.c
+++ b/src/util/register_allocate.c
@@ -638,6 +638,7 @@ ra_select(struct ra_graph *g)
           }
r = g->select_reg_callback(g, select_regs, g->select_reg_callback_data);
+         free(select_regs);

I don't think this is correct, as the whole thing executes in a loop.

Please put this at the end of the function (no guard necessary).

Cheers,
Nicolai


        } else {
           /* Find the lowest-numbered reg which is not used by a member
            * of the graph adjacent to us.



--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to