aubinator: don't leak fd of opened aubfile
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 13 Jul 2017 15:39:42 +0000 (16:39 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 13 Jul 2017 21:50:50 +0000 (22:50 +0100)
CID: 1373563
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/intel/tools/aubinator.c

index 6c9a8f0..48d4456 100644 (file)
@@ -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;