etnaviv: Fix memory leak on error path.
authorVinson Lee <vlee@freedesktop.org>
Tue, 26 May 2020 22:54:06 +0000 (15:54 -0700)
committerMarge Bot <eric+marge@anholt.net>
Sat, 30 May 2020 01:04:30 +0000 (01:04 +0000)
commitf047d585ee472a314d4ad5da4dffa5e7c2a42eb5
tree4c31568ee1e4f240c33ea5b7693ba8a8c90a187c
parentbccb3deee2995e68a7f8a63d857f2cd298ff8361
etnaviv: Fix memory leak on error path.

Fix warning reported by Coverity Scan.

Resource leak (RESOURCE_LEAK)
leaked_storage: Variable pq going out of scope leaks the storage it
points to.

Suggested-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Fixes: eed5a009897a ("etnaviv: convert perfmon queries to acc queries")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5220>
src/gallium/drivers/etnaviv/etnaviv_query_acc_perfmon.c