[Mesa-dev] [PATCH mesa v2] util/ra: fix memory leak

Eric Engestrom eric.engestrom at imgtec.com
Mon Jul 31 13:13:58 UTC 2017


From: Eric Engestrom <eric at engestrom.ch>

CID: 1415909
Fixes: 7a34a0e8903249c41fae "ra: Add a callback for selecting a register
                             from what's available."
Signed-off-by: Eric Engestrom <eric at engestrom.ch>
---
v2: don't free inside the loop... (Nicolai)
---
 src/util/register_allocate.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/util/register_allocate.c b/src/util/register_allocate.c
index b06a61f24a..de8978bb93 100644
--- a/src/util/register_allocate.c
+++ b/src/util/register_allocate.c
@@ -672,6 +672,8 @@ ra_select(struct ra_graph *g)
          start_search_reg = r + 1;
    }
 
+   free(select_regs);
+
    return true;
 }
 
-- 
Cheers,
  Eric



More information about the mesa-dev mailing list