intel/clc: Free disk_cache

Fixes: c15bf88f01 ("intel: Add a little OpenCL C compiler binary")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30313>
(cherry picked from commit aae82061af)
This commit is contained in:
Matt Turner 2024-07-22 21:35:34 -04:00 committed by Eric Engestrom
parent 9e6ebed213
commit 1ff8e0e7f8
2 changed files with 7 additions and 3 deletions

View file

@ -174,7 +174,7 @@
"description": "intel/clc: Free disk_cache",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "c15bf88f011d204c11e893c5ff0fd018a0262a39",
"notes": null

View file

@ -413,6 +413,7 @@ output_isa(const struct intel_clc_params *params, struct clc_binary *binary)
{
struct brw_kernel kernel = {};
char *error_str;
int ret = 0;
struct brw_isa_info _isa, *isa = &_isa;
brw_init_isa_info(isa, &params->devinfo);
@ -427,7 +428,8 @@ output_isa(const struct intel_clc_params *params, struct clc_binary *binary)
binary->data, binary->size,
params->entry_point, &error_str)) {
fprintf(stderr, "Compile failed: %s\n", error_str);
return -1;
ret = -1;
goto exit;
}
if (params->print_info) {
@ -465,7 +467,9 @@ output_isa(const struct intel_clc_params *params, struct clc_binary *binary)
print_kernel(stdout, prefix, &kernel, isa);
}
return 0;
exit:
disk_cache_destroy(disk_cache);
return ret;
}
static void