mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
anv: don't leak memory if anv_init_wsi() fails
brw_compiler_create() rzalloc-ates memory which we forgot to free. Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
3af8171547
commit
a1cf494f77
1 changed files with 4 additions and 2 deletions
|
|
@ -208,8 +208,10 @@ anv_physical_device_init(struct anv_physical_device *device,
|
|||
device->compiler->shader_perf_log = compiler_perf_log;
|
||||
|
||||
result = anv_init_wsi(device);
|
||||
if (result != VK_SUCCESS)
|
||||
goto fail;
|
||||
if (result != VK_SUCCESS) {
|
||||
ralloc_free(device->compiler);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
isl_device_init(&device->isl_dev, &device->info, swizzled);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue