diff options
author | Nicolai Hähnle <[email protected]> | 2016-06-02 22:48:52 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2016-06-06 21:42:27 +0200 |
commit | 0f916d4ca741ff544fa2da72c3b11c5ca64b8b74 (patch) | |
tree | 1a2d8175a394ad873075227e29073bc87d77dea7 | |
parent | 627e975896e0ec1b058c6acc071fdaecbb055ce6 (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]>
-rw-r--r-- | src/mesa/state_tracker/st_cb_readpixels.c | 2 |
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; |