summaryrefslogtreecommitdiffstats
path: root/src/intel/tools/intel_dump_gpu.c
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2019-04-27 09:36:23 +0800
committerLionel Landwerlin <[email protected]>2019-06-12 09:49:55 +0300
commitf80679c8e8aa3f1ff17deef7163ad9429eb90f44 (patch)
tree24753e7506d40197c680af14028769d34d8a96d3 /src/intel/tools/intel_dump_gpu.c
parent48d7e7a9b85d1391aaf2a605319b23e6e13fa096 (diff)
intel/dump: fix segfault when the app hasn't accessed the device
Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/tools/intel_dump_gpu.c')
-rw-r--r--src/intel/tools/intel_dump_gpu.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/intel/tools/intel_dump_gpu.c b/src/intel/tools/intel_dump_gpu.c
index d378375951e..09b8db39aa2 100644
--- a/src/intel/tools/intel_dump_gpu.c
+++ b/src/intel/tools/intel_dump_gpu.c
@@ -567,7 +567,9 @@ ioctl_init_helper(int fd, unsigned long request, ...)
static void __attribute__ ((destructor))
fini(void)
{
- free(output_filename);
- aub_file_finish(&aub_file);
- free(bos);
+ if (devinfo.gen != 0) {
+ free(output_filename);
+ aub_file_finish(&aub_file);
+ free(bos);
+ }
}