From 15b603e26b25d33a9a71b80c4438e6d99c28bff0 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Fri, 9 Oct 2015 22:27:22 +0000 Subject: Minor leak fixed git-svn-id: http://svn.miranda-ng.org/main/trunk@15525 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/stdmsg/src/msgs.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index a8f2651cf2..66655cc34f 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -31,6 +31,7 @@ const CLSID IID_IRichEditOleCallback = { 0x00020D03, 0x00, 0x00, { 0xC0, 0x00, 0 HCURSOR hCurSplitNS, hCurSplitWE, hCurHyperlinkHand; HANDLE hHookWinEvt, hHookWinPopup, hHookWinWrite; HGENMENU hMsgMenuItem; +HMODULE hMsftEdit; static int SRMMStatusToPf2(int status) { @@ -383,7 +384,7 @@ static TCHAR tszError[] = LPGENT("Miranda could not load the built-in message mo int LoadSendRecvMessageModule(void) { - if (LoadLibraryA("Msftedit.dll") == NULL) { + if ((hMsftEdit = LoadLibrary(_T("Msftedit.dll"))) == NULL) { if (IDYES != MessageBox(0, TranslateTS(tszError), TranslateT("Information"), MB_YESNO | MB_ICONINFORMATION)) return 1; return 0; @@ -443,7 +444,7 @@ int SplitmsgShutdown(void) DestroyHookableEvent(hHookWinWrite); FreeMsgLogIcons(); - FreeLibrary(GetModuleHandleA("Msftedit")); + FreeLibrary(hMsftEdit); RichUtil_Unload(); msgQueue_destroy(); return 0; -- cgit v1.2.3