util/ra: fix memory leak
authorEric Engestrom <eric@engestrom.ch>
Mon, 31 Jul 2017 13:13:58 +0000 (14:13 +0100)
committerEric Anholt <eric@anholt.net>
Mon, 31 Jul 2017 19:55:19 +0000 (12:55 -0700)
CID: 1415909
Fixes: 7a34a0e8903249c41fae "ra: Add a callback for selecting a register
                             from what's available."
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/util/register_allocate.c

index b06a61f..de8978b 100644 (file)
@@ -672,6 +672,8 @@ ra_select(struct ra_graph *g)
          start_search_reg = r + 1;
    }
 
+   free(select_regs);
+
    return true;
 }