From d85330a92a467f31af472700acbf148b192302cf Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Mon, 12 Dec 2005 20:49:35 +0000 Subject: [PATCH] Check for failed allocations. Spotted by Martin Bealby. svn path=/trunk/; revision=20118 --- reactos/lib/user32/misc/winhelp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reactos/lib/user32/misc/winhelp.c b/reactos/lib/user32/misc/winhelp.c index 3a8c553881b..8abf11b5ed0 100644 --- a/reactos/lib/user32/misc/winhelp.c +++ b/reactos/lib/user32/misc/winhelp.c @@ -107,6 +107,8 @@ WinHelpA(HWND hWnd, LPCSTR lpszHelp, UINT uCommand, DWORD dwData) nlen = 0; size = sizeof(WINHELP) + nlen + dsize; hwh = GlobalAlloc(0,size); + if (hwh == NULL) + return FALSE; lpwh = GlobalLock(hwh); lpwh->size = size; lpwh->command = uCommand;