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

Nicolai Hähnle nhaehnle at gmail.com
Mon Jul 31 15:46:24 UTC 2017


On 31.07.2017 15:13, Eric Engestrom wrote:
> 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)

Thanks!

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>


> ---
>   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;
>   }
>   
> 


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list