From: Lionel Landwerlin Date: Thu, 13 Jul 2017 15:39:42 +0000 (+0100) Subject: aubinator: don't leak fd of opened aubfile X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6131a1ae40d2f24df71c5c701d7cbd1286114998;p=mesa.git aubinator: don't leak fd of opened aubfile CID: 1373563 Signed-off-by: Lionel Landwerlin Reviewed-by: Anuj Phogat --- diff --git a/src/intel/tools/aubinator.c b/src/intel/tools/aubinator.c index 6c9a8f052c2..48d4456cc16 100644 --- a/src/intel/tools/aubinator.c +++ b/src/intel/tools/aubinator.c @@ -904,6 +904,8 @@ aub_file_open(const char *filename) exit(EXIT_FAILURE); } + close(fd); + file->cursor = file->map; file->end = file->map + sb.st_size / 4;