mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 07:30:09 +01:00
hk: fix instance reference in vk_free
In hk_create_drm_physical_device() we might call vk_free() passing pdev->vk.instance->alloc as first argument, but if we've arrived there via fail_pdev_alloc the instance has not yet been installed into the physical device, potentially triggering a SIGSEGV. Fix it by using a direct reference to the instance as first argument. Signed-off-by: Sergio Lopez <slp@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37642>
This commit is contained in:
parent
f5dd8436b2
commit
2732837591
1 changed files with 1 additions and 1 deletions
|
|
@ -1297,7 +1297,7 @@ fail_pdev_alloc:
|
|||
if (pdev->master_fd)
|
||||
close(pdev->master_fd);
|
||||
|
||||
vk_free(&pdev->vk.instance->alloc, pdev);
|
||||
vk_free(&instance->vk.alloc, pdev);
|
||||
fail_fd:
|
||||
close(fd);
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue