Mesa (master): zink: delete query rather than allocating a new one
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Nov 29 09:19:23 UTC 2019
Module: Mesa
Branch: master
Commit: 49f53ee336e0cc0ad89ab1a8178c4d751dd09de8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=49f53ee336e0cc0ad89ab1a8178c4d751dd09de8
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Wed Nov 27 16:30:29 2019 +0100
zink: delete query rather than allocating a new one
It seems I had some fat fingers when writing this function, and I
accidentally ended up allocating a new query and immediately trying to
delete an uninitialized pool instead of just deleting the pool of the
query that was passed.
CoverityID: 1455196
Reviewed-by: Dave Airlie <airlied at redhat.com>
---
src/gallium/drivers/zink/zink_query.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/zink/zink_query.c b/src/gallium/drivers/zink/zink_query.c
index 615bd2b9368..e8ed72a1da5 100644
--- a/src/gallium/drivers/zink/zink_query.c
+++ b/src/gallium/drivers/zink/zink_query.c
@@ -80,7 +80,7 @@ zink_destroy_query(struct pipe_context *pctx,
struct pipe_query *q)
{
struct zink_screen *screen = zink_screen(pctx->screen);
- struct zink_query *query = CALLOC_STRUCT(zink_query);
+ struct zink_query *query = (struct zink_query *)q;
vkDestroyQueryPool(screen->dev, query->query_pool, NULL);
}
More information about the mesa-commit
mailing list