Reviewed-by: Thomas Helland<[email protected]>

On Jun 12, 2017 21:50, "Dave Airlie" <[email protected]> wrote:

> From: Dave Airlie <[email protected]>
>
> >>>     Ignoring storage allocated by "reralloc_size(buf->mem_ctx,
> buf->data, buf->size)" leaks it.
>
> Signed-off-by: Dave Airlie <[email protected]>
> ---
>  src/util/u_dynarray.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/util/u_dynarray.h b/src/util/u_dynarray.h
> index e9109cc..fdcd09c 100644
> --- a/src/util/u_dynarray.h
> +++ b/src/util/u_dynarray.h
> @@ -107,7 +107,7 @@ util_dynarray_trim(struct util_dynarray *buf)
>     if (buf->size != buf->capacity) {
>        if (buf->size) {
>           if (buf->mem_ctx) {
> -            reralloc_size(buf->mem_ctx, buf->data, buf->size);
> +            buf->data = reralloc_size(buf->mem_ctx, buf->data, buf->size);
>           } else {
>              buf->data = realloc(buf->data, buf->size);
>           }
> --
> 2.9.4
>
> _______________________________________________
> mesa-dev mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to