Commit ae9d5ce5 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

user32: Fix memory leak in WinHelpA().

parent 1cd883fc
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment