From: Danylo Piliaiev Date: Tue, 13 Aug 2019 08:25:03 +0000 (+0300) Subject: intel/compiler: Fix resource leak in error path X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=72354d43d405624f09182fe8dfe3bea1a35a9194;p=mesa.git 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 Reviewed-by: Tapani Pälli --- 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; }