[Mesa-dev] [PATCH 9/9] aubinator: don't leak fd of opened aubfile

Lionel Landwerlin lionel.g.landwerlin at intel.com
Thu Jul 13 17:09:02 UTC 2017


CID: 1373563
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
 src/intel/tools/aubinator.c | 2 ++
 1 file changed, 2 insertions(+)

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;
 
-- 
2.13.2



More information about the mesa-dev mailing list