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:

committed by
Emil Velikov

parent
3af8171547
commit
a1cf494f77
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user