nvk: fix dri options leak.

Noticed in valgrind.

Fixes: edb5229538 ("nvk: Hook up driconf for nvk_instance")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27712>
(cherry picked from commit f47858b837)
This commit is contained in:
Dave Airlie 2024-02-21 14:31:56 +10:00 committed by Eric Engestrom
parent 2bc85abbf2
commit 2e1ccf1c59
2 changed files with 4 additions and 1 deletions

View file

@ -2044,7 +2044,7 @@
"description": "nvk: fix dri options leak.",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "edb52295387839b032d9c14bbf09994d4a3416d7",
"notes": null

View file

@ -155,6 +155,9 @@ nvk_DestroyInstance(VkInstance _instance,
if (!instance)
return;
driDestroyOptionCache(&instance->dri_options);
driDestroyOptionInfo(&instance->available_dri_options);
vk_instance_finish(&instance->vk);
vk_free(&instance->vk.alloc, instance);
}