intel/dump: fix segfault when the app hasn't accessed the device

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit f80679c8e8)
This commit is contained in:
Lionel Landwerlin 2019-04-27 09:36:23 +08:00 committed by Juan A. Suarez Romero
parent efc5518410
commit 0f8193cb18

View file

@ -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);
}
}