=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: user32: Fix memory leak in WinHelpA().
Alexandre Julliard
julliard at winehq.org
Fri Oct 20 07:19:59 CDT 2017
Module: wine
Branch: stable
Commit: ee4165f4373b96328b90f35d279c66af49835967
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ee4165f4373b96328b90f35d279c66af49835967
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Tue May 30 12:21:54 2017 +0200
user32: Fix memory leak in WinHelpA().
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit ae9d5ce5f70ca196ee6b71e9d16cd4ded914d4f3)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/user32/winhelp.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/winhelp.c b/dlls/user32/winhelp.c
index a2c331b..c40b0fc 100644
--- a/dlls/user32/winhelp.c
+++ b/dlls/user32/winhelp.c
@@ -80,6 +80,7 @@ BOOL WINAPI WinHelpA( HWND hWnd, LPCSTR lpHelpFile, UINT wCommand, ULONG_PTR dwD
HWND hDest;
int size, dsize, nlen;
WINHELP* lpwh;
+ LRESULT ret;
hDest = FindWindowA("MS_WINHELP", NULL);
if (!hDest)
@@ -156,7 +157,9 @@ BOOL WINAPI WinHelpA( HWND hWnd, LPCSTR lpHelpFile, UINT wCommand, ULONG_PTR dwD
lpwh->size, lpwh->command, lpwh->data,
lpwh->ofsFilename ? (LPSTR)lpwh + lpwh->ofsFilename : "");
- return SendMessageA(hDest, WM_COPYDATA, (WPARAM)hWnd, (LPARAM)&cds);
+ ret = SendMessageA(hDest, WM_COPYDATA, (WPARAM)hWnd, (LPARAM)&cds);
+ HeapFree(GetProcessHeap(), 0, lpwh);
+ return ret;
}
More information about the wine-cvs
mailing list