mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-09 07:58:16 +02:00
asahi/clc: fix mem leaks
needed to build mesa with asan enabled Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
This commit is contained in:
parent
2e28998017
commit
114f858440
1 changed files with 6 additions and 1 deletions
|
|
@ -491,7 +491,7 @@ main(int argc, char **argv)
|
|||
fprintf(fp, " #include <stdint.h>\n");
|
||||
|
||||
/* Compile SPIR-V to NIR */
|
||||
nir_shader *nir = compile(NULL, final_spirv.data, final_spirv.size);
|
||||
nir_shader *nir = compile(mem_ctx, final_spirv.data, final_spirv.size);
|
||||
|
||||
{
|
||||
struct util_dynarray binary;
|
||||
|
|
@ -543,6 +543,11 @@ main(int argc, char **argv)
|
|||
if (fp != stdout)
|
||||
fclose(fp);
|
||||
|
||||
util_dynarray_foreach(&spirv_objs, struct clc_binary, p) {
|
||||
clc_free_spirv(p);
|
||||
}
|
||||
|
||||
clc_free_spirv(&final_spirv);
|
||||
ralloc_free(mem_ctx);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue