Fixed memory leak in the Windows driver
diff --git a/src/video/windows/SDL_windowskeyboard.c b/src/video/windows/SDL_windowskeyboard.c
index 9ff31d7..0f0402b 100644
--- a/src/video/windows/SDL_windowskeyboard.c
+++ b/src/video/windows/SDL_windowskeyboard.c
@@ -158,9 +158,16 @@ WIN_UpdateKeymap(SDL_bool send_event)
void
WIN_QuitKeyboard(_THIS)
{
+ SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
+
#ifndef SDL_DISABLE_WINDOWS_IME
- IME_Quit((SDL_VideoData *)_this->driverdata);
+ IME_Quit(data);
#endif
+
+ if (data->ime_composition) {
+ SDL_free(data->ime_composition);
+ data->ime_composition = NULL;
+ }
}
void