From 4c9adab58d29393c7700ecb369c9a1f28d1f1370 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Thu, 9 Jan 2025 15:27:12 -0800 Subject: [PATCH] Windows/CRT: Fixes FD leak Noticed that the FEXCore config file was open forever. --- Source/Windows/Common/CRT/IO.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Windows/Common/CRT/IO.cpp b/Source/Windows/Common/CRT/IO.cpp index dd2cb0af0..fc18e360b 100644 --- a/Source/Windows/Common/CRT/IO.cpp +++ b/Source/Windows/Common/CRT/IO.cpp @@ -36,6 +36,10 @@ struct FILE { : Handle {Handle} , FileHandle {FileHandle} , Append {Append} {} + + ~FILE() { + CloseHandle(Handle); + } }; namespace {