[Mesa-dev] [PATCH v2] st/mesa: fix resource leak in try_pbo_readpixels
Marek Olšák
maraeo at gmail.com
Fri Jun 3 12:40:41 UTC 2016
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Fri, Jun 3, 2016 at 2:13 PM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>
> Found by inspection after seeing
> https://bugs.freedesktop.org/show_bug.cgi?id=96343
> ---
> src/mesa/state_tracker/st_cb_readpixels.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c
> index 6df3a39..599cb9e 100644
> --- a/src/mesa/state_tracker/st_cb_readpixels.c
> +++ b/src/mesa/state_tracker/st_cb_readpixels.c
> @@ -163,7 +163,7 @@ try_pbo_readpixels(struct st_context *st, struct st_renderbuffer *strb,
> struct pipe_image_view image;
>
> memset(&image, 0, sizeof(image));
> - pipe_resource_reference(&image.resource, addr.buffer);
> + image.resource = addr.buffer;
> image.format = dst_format;
> image.access = PIPE_IMAGE_ACCESS_WRITE;
> image.u.buf.first_element = addr.first_element;
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list