On Thursday, August 17, 2017 10:22:15 AM PDT Jason Ekstrand wrote:
> ---
>  src/util/ralloc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/util/ralloc.c b/src/util/ralloc.c
> index bf46439..4015c7e 100644
> --- a/src/util/ralloc.c
> +++ b/src/util/ralloc.c
> @@ -285,7 +285,7 @@ ralloc_steal(const void *new_ctx, void *ptr)
>        return;
>  
>     info = get_header(ptr);
> -   parent = get_header(new_ctx);
> +   parent = new_ctx ? get_header(new_ctx) : NULL;
>  
>     unlink_block(info);
>  
> 

This patch is:
Reviewed-by: Kenneth Graunke <kenn...@whitecape.org>

ralloc_adopt() doesn't properly handle NULL either, but frankly...
reparenting an unknown set of children to the NULL context sounds like a
recipe for leaks.  :)  So I'm not sure it's worth fixing.

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to