intel/compiler: Fix resource leak in error path

CID: 1452261

Fixes: 04a99515 "intel/compiler: add ability to override shader's assembly"

Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
This commit is contained in:
Danylo Piliaiev
2019-08-13 11:25:03 +03:00
committed by Tapani Pälli
parent 44a6c38bd6
commit 72354d43d4

View File

@@ -370,6 +370,7 @@ bool brw_try_override_assembly(struct brw_codegen *p, int start_offset,
struct stat sb;
if (fstat(fd, &sb) != 0 || (!S_ISREG(sb.st_mode))) {
close(fd);
return false;
}