From b9223f114d49222cbf6030921320ac1628ccec69 Mon Sep 17 00:00:00 2001 From: Takuro Ashie Date: Fri, 15 Apr 2022 15:01:27 +0900 Subject: [PATCH] Win32: Plug potential memory leaks --- src/win32_window.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/win32_window.c b/src/win32_window.c index 7bb6fada..a4bda86f 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -582,6 +582,7 @@ static GLFWbool getImmPreedit(_GLFWwindow* window) _glfw_free(buffer); _glfw_free(attributes); _glfw_free(clauses); + ImmReleaseContext(window->win32.handle, hIMC); return GLFW_FALSE; } window->preeditText = preeditText; @@ -610,6 +611,7 @@ static GLFWbool getImmPreedit(_GLFWwindow* window) _glfw_free(buffer); _glfw_free(attributes); _glfw_free(clauses); + ImmReleaseContext(window->win32.handle, hIMC); return GLFW_FALSE; } window->preeditAttributeBlocks = blocks;