Mesa (master): aubinator: don't leak fd of opened aubfile

Lionel Landwerlin llandwerlin at kemper.freedesktop.org
Thu Jul 13 21:51:10 UTC 2017


Module: Mesa
Branch: master
Commit: 6131a1ae40d2f24df71c5c701d7cbd1286114998
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6131a1ae40d2f24df71c5c701d7cbd1286114998

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Thu Jul 13 16:39:42 2017 +0100

aubinator: don't leak fd of opened aubfile

CID: 1373563
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.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 6c9a8f052c..48d4456cc1 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;
 




More information about the mesa-commit mailing list