asahi: Fix memory leak on error path.
authorVinson Lee <vlee@freedesktop.org>
Sun, 20 Nov 2022 22:08:50 +0000 (14:08 -0800)
committerMarge Bot <emma+marge@anholt.net>
Mon, 21 Nov 2022 04:38:55 +0000 (04:38 +0000)
commitd6d772d3d162f9cee1f64fc7d0c87b63f7d1c9d4
treee530bdbca936e89d4dade2c25857ed82aae16b02
parente3b1f26a2b83538eb175be28b2e785bbe626bf5f
asahi: Fix memory leak on error path.

Fix defect reported by Coverity Scan.

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

Fixes: 7522f4f7147 ("asahi: Make resource creation code modifier-aware")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19889>
src/gallium/drivers/asahi/agx_pipe.c