https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0a723a2c75baae3ac01b2f...
commit 0a723a2c75baae3ac01b2fd1ec2791c22be99dbb Author: Katayama Hirofumi MZ katayama.hirofumi.mz@gmail.com AuthorDate: Thu Dec 20 23:16:04 2018 +0900 Commit: Katayama Hirofumi MZ katayama.hirofumi.mz@gmail.com CommitDate: Thu Dec 20 23:19:01 2018 +0900
[ROSAPPS][VGAFONTEDIT] Fix memory leaks --- modules/rosapps/applications/devutils/vgafontedit/mainwnd.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/modules/rosapps/applications/devutils/vgafontedit/mainwnd.c b/modules/rosapps/applications/devutils/vgafontedit/mainwnd.c index 8057df50d7..a99812edf0 100644 --- a/modules/rosapps/applications/devutils/vgafontedit/mainwnd.c +++ b/modules/rosapps/applications/devutils/vgafontedit/mainwnd.c @@ -222,6 +222,10 @@ DoFileOpen(IN PMAIN_WND_INFO Info) OpenInfo->bCreateNew = FALSE; CreateFontWindow(Info, OpenInfo); } + else + { + HeapFree(hProcessHeap, 0, OpenInfo->pszFileName); + } } else { @@ -246,6 +250,7 @@ MainWndOpenFile(IN PMAIN_WND_INFO Info, LPCWSTR File) else { MessageBoxW(Info->hMainWnd, L"Pathname is too long!", NULL, MB_ICONERROR); + HeapFree(hProcessHeap, 0, OpenInfo->pszFileName); } } else