From 0f916d4ca741ff544fa2da72c3b11c5ca64b8b74 Mon Sep 17 00:00:00 2001 From: Nicolai Hähnle Date: Thu, 2 Jun 2016 22:48:52 +0200 Subject: st/mesa: fix resource leak in try_pbo_readpixels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found by inspection after seeing https://bugs.freedesktop.org/show_bug.cgi?id=96343 Reviewed-by: Marek Olšák --- src/mesa/state_tracker/st_cb_readpixels.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c index 09450c9f41b..42ff73b0691 100644 --- a/src/mesa/state_tracker/st_cb_readpixels.c +++ b/src/mesa/state_tracker/st_cb_readpixels.c @@ -169,7 +169,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; -- cgit v1.2.3