From 16a5d1a6b1bd3fe9a11aa15840d7b6533c14b48b Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Wed, 14 Feb 2024 12:21:47 -0800 Subject: [PATCH] FileFormatCheck: Fixes FD leak --- Source/Common/FileFormatCheck.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Common/FileFormatCheck.cpp b/Source/Common/FileFormatCheck.cpp index 4b921efe03..6f81772cc4 100644 --- a/Source/Common/FileFormatCheck.cpp +++ b/Source/Common/FileFormatCheck.cpp @@ -74,6 +74,8 @@ namespace FEX::FormatCheck { return false; } + close(fd); + return Header.Magic == COOKIE_MAGIC_V1; } }