Skip to content

Commit

Permalink
ime: fixed memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
wkpark committed Feb 10, 2023
1 parent 5a0e745 commit 2c3f099
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/subs.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ HKL PASCAL GetMyHKL()

dwSize = GetKeyboardLayoutList(0, NULL);

lphkl = (HKL *)GlobalAlloc(GPTR, dwSize * sizeof(DWORD));
lphkl = (HKL *)GlobalAlloc(GPTR, dwSize * sizeof(HKL));

if (!lphkl)
return NULL;
Expand All @@ -467,7 +467,7 @@ HKL PASCAL GetMyHKL()
{
TCHAR szFile[32];
HKL hKLTemp = *(lphkl + dwi);
ImmGetIMEFileName(hKLTemp, szFile, sizeof(szFile));
ImmGetIMEFileName(hKLTemp, szFile, sizeof(szFile) / sizeof(TCHAR));

if (!lstrcmpi(szFile, MyFileName))
{
Expand Down

0 comments on commit 2c3f099

Please sign in to comment.