https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5462d4adad86e791aa01c…
commit 5462d4adad86e791aa01c623badce429748adac3
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Fri Oct 21 16:40:25 2022 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Fri Oct 21 16:40:25 2022 +0900
[IMM32] Imm32InternalLockIMC: Unlock hIC on failure
CORE-11700
---
dll/win32/imm32/imm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dll/win32/imm32/imm.c b/dll/win32/imm32/imm.c
index a0a250c5a75..d6e0cb1431f 100644
--- a/dll/win32/imm32/imm.c
+++ b/dll/win32/imm32/imm.c
@@ -867,7 +867,8 @@ LPINPUTCONTEXT APIENTRY Imm32InternalLockIMC(HIMC hIMC, BOOL fSelect)
hNewKL = GetKeyboardLayout(dwThreadId);
if (!Imm32CreateInputContext(hIMC, pIC, pClientImc, hNewKL, fSelect))
{
- pClientImc->hInputContext = LocalFree(pClientImc->hInputContext);
+ LocalUnlock(hIC);
+ pClientImc->hInputContext = LocalFree(hIC);
goto Failure;
}