summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2016-06-02 22:48:52 +0200
committerNicolai Hähnle <[email protected]>2016-06-06 21:42:27 +0200
commit0f916d4ca741ff544fa2da72c3b11c5ca64b8b74 (patch)
tree1a2d8175a394ad873075227e29073bc87d77dea7 /src/mesa
parent627e975896e0ec1b058c6acc071fdaecbb055ce6 (diff)
st/mesa: fix resource leak in try_pbo_readpixels
Found by inspection after seeing https://bugs.freedesktop.org/show_bug.cgi?id=96343 Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_cb_readpixels.c2
1 files changed, 1 insertions, 1 deletions
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;