From 72354d43d405624f09182fe8dfe3bea1a35a9194 Mon Sep 17 00:00:00 2001 From: Danylo Piliaiev Date: Tue, 13 Aug 2019 11:25:03 +0300 Subject: [PATCH] intel/compiler: Fix resource leak in error path MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit CID: 1452261 Fixes: 04a99515 "intel/compiler: add ability to override shader's assembly" Signed-off-by: Danylo Piliaiev Reviewed-by: Tapani Pälli --- src/intel/compiler/brw_eu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/intel/compiler/brw_eu.c b/src/intel/compiler/brw_eu.c index 882293e981b..db08999c7ee 100644 --- a/src/intel/compiler/brw_eu.c +++ b/src/intel/compiler/brw_eu.c @@ -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; } -- 2.30.2