diff options
author | Andrii Simiklit <[email protected]> | 2018-10-26 17:29:34 +0300 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2018-11-01 13:21:07 +0000 |
commit | fc3cecda8cea97727ac5233e35e774035d3dff13 (patch) | |
tree | 842add7bcfeba042c4cc48202a647fc0b31abe6f /src/intel/tools | |
parent | ae8e81b0e300e9ad5c3635378cc0467e8d50f239 (diff) |
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 <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/tools')
-rw-r--r-- | src/intel/tools/error2aub.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/intel/tools/error2aub.c b/src/intel/tools/error2aub.c index b6e056cbcde..fb4b4ffcfc6 100644 --- a/src/intel/tools/error2aub.c +++ b/src/intel/tools/error2aub.c @@ -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; } |