panvk: Free the decode context in the create_device() error path

If we don't do that and something fails in the middle, we leak
the decode context.

Fixes: d155d6b7a3 ("panvk: Add a decode context at the panvk_device level")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38923>
This commit is contained in:
Boris Brezillon 2025-12-13 14:53:10 +01:00
parent bbc8ce2704
commit 55481b6f10

View file

@ -612,6 +612,9 @@ err_free_priv_bos:
simple_mtx_destroy(&device->as.lock);
err_destroy_kdev:
if (device->debug.decode_ctx)
pandecode_destroy_context(device->debug.decode_ctx);
pan_kmod_dev_destroy(device->kmod.dev);
err_finish_dev: