From b4a3d6a6f21780e26693118db1a6bda562e72934 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Sat, 11 Nov 2023 00:48:21 +0100 Subject: [PATCH] Fix a memory leak --- PowerEditor/src/MISC/Common/FileInterface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PowerEditor/src/MISC/Common/FileInterface.cpp b/PowerEditor/src/MISC/Common/FileInterface.cpp index add8ed5b2164..49504caeab41 100644 --- a/PowerEditor/src/MISC/Common/FileInterface.cpp +++ b/PowerEditor/src/MISC/Common/FileInterface.cpp @@ -41,9 +41,10 @@ Win32_IO_File::Win32_IO_File(const wchar_t *fname) WIN32_FIND_STREAM_DATA findData; HANDLE hFind = FindFirstStreamW(fname, FindStreamInfoStandard, &findData, 0); if (hFind != INVALID_HANDLE_VALUE) // Alternate Data Streams found + { dispParam = TRUNCATE_EXISTING; - else FindClose(hFind); + } } _hFile = ::CreateFileW(fname, _accessParam, _shareParam, NULL, dispParam, _attribParam, NULL);