[PATCH] user32: init hICON to NULL (Coverity)
Marcus Meissner
marcus at jet.franken.de
Tue Dec 29 16:04:46 CST 2009
Hi,
hicon could be used uninitialized in the error path.
Ciao, Marcus
---
dlls/user32/static.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/static.c b/dlls/user32/static.c
index 5386c84..f765df4 100644
--- a/dlls/user32/static.c
+++ b/dlls/user32/static.c
@@ -258,7 +258,7 @@ static HANDLE STATIC_GetImage( HWND hwnd, WPARAM wParam, DWORD style )
*/
static HICON STATIC_LoadIconA( HINSTANCE hInstance, LPCSTR name, DWORD style )
{
- HICON hicon;
+ HICON hicon = NULL;
if (hInstance && ((ULONG_PTR)hInstance >> 16))
{
@@ -284,7 +284,7 @@ static HICON STATIC_LoadIconA( HINSTANCE hInstance, LPCSTR name, DWORD style )
*/
static HICON STATIC_LoadIconW( HINSTANCE hInstance, LPCWSTR name, DWORD style )
{
- HICON hicon;
+ HICON hicon = NULL;
if (hInstance && ((ULONG_PTR)hInstance >> 16))
{
--
1.5.6
More information about the wine-patches
mailing list