mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
vc4: Fix leak in HW queries error path
Reported by Coverity: in the case where there exist hardware and
non-hardware queries, the code does not jump to err_free_query and leaks
the query.
CID: 1430194
Signed-off-by: Ernestas Kulik <ernestas.kulik@gmail.com>
Fixes: 9ea90ffb98 ("broadcom/vc4: Add support for HW perfmon")
This commit is contained in:
parent
6053c7bb43
commit
f6e49d5ad0
1 changed files with 1 additions and 1 deletions
|
|
@ -132,7 +132,7 @@ vc4_create_batch_query(struct pipe_context *pctx, unsigned num_queries,
|
|||
|
||||
/* We can't mix HW and non-HW queries. */
|
||||
if (nhwqueries && nhwqueries != num_queries)
|
||||
return NULL;
|
||||
goto err_free_query;
|
||||
|
||||
if (!nhwqueries)
|
||||
return (struct pipe_query *)query;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue