mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 11:00:11 +01:00
intel/tools: fix resource leak
Some memory and file descriptors are not freed/closed. v2: fixed case where we skipped the 'aub' variable initialization Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
parent
ae8e81b0e3
commit
fc3cecda8c
1 changed files with 10 additions and 0 deletions
|
|
@ -327,6 +327,16 @@ main(int argc, char *argv[])
|
|||
|
||||
aub_write_exec(&aub, batch_addr, aub_gtt_size(&aub), I915_EXEC_RENDER);
|
||||
|
||||
free(out_filename);
|
||||
free(line);
|
||||
if(err_file) {
|
||||
fclose(err_file);
|
||||
}
|
||||
if(aub.file) {
|
||||
aub_file_finish(&aub);
|
||||
} else if(aub_file) {
|
||||
fclose(aub_file);
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue