diff options
author | Lionel Landwerlin <[email protected]> | 2019-04-27 09:36:23 +0800 |
---|---|---|
committer | Juan A. Suarez Romero <[email protected]> | 2019-06-14 09:09:37 +0000 |
commit | 0f8193cb18d3d8557dd934cc2d169fe6a63321e7 (patch) | |
tree | 49a9d2cf4b95dff7aff1cff4ea1880e32bf0f874 /src | |
parent | efc5518410df63c3c0cef5c3d8147345a9ebab4d (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]>
(cherry picked from commit f80679c8e8aa3f1ff17deef7163ad9429eb90f44)
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/tools/intel_dump_gpu.c | 8 |
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 23112cadc36..74a892c358d 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); + } } |