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 b06a61f24a37f89b29d172df8f1ce710b12abc62..de8978bb93e424ef4ab0e66c799b2b121ebe5503 100644 (file)
@@ -672,6 +672,8 @@ ra_select(struct ra_graph *g)
          start_search_reg = r + 1;
    }
 
+   free(select_regs);
+
    return true;
 }