Commit 50275015 authored by Mikołaj Zalewski's avatar Mikołaj Zalewski Committed by Alexandre Julliard

shell32: Don't free user supplied data in Shell_NotifyIcon if GetIconInfo failed.

We should free the nid and in such a case we were doing it.
parent cdf06864
...@@ -89,6 +89,7 @@ BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW nid) ...@@ -89,6 +89,7 @@ BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW nid)
{ {
HWND tray; HWND tray;
COPYDATASTRUCT cds; COPYDATASTRUCT cds;
char *buffer = NULL;
TRACE("dwMessage = %d, nid->cbSize=%d\n", dwMessage, nid->cbSize); TRACE("dwMessage = %d, nid->cbSize=%d\n", dwMessage, nid->cbSize);
...@@ -102,7 +103,6 @@ BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW nid) ...@@ -102,7 +103,6 @@ BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW nid)
if (nid->uFlags & NIF_ICON) if (nid->uFlags & NIF_ICON)
{ {
ICONINFO iconinfo; ICONINFO iconinfo;
char *buffer;
BITMAP bmMask; BITMAP bmMask;
BITMAP bmColour; BITMAP bmColour;
LONG cbMaskBits; LONG cbMaskBits;
...@@ -156,8 +156,7 @@ noicon: ...@@ -156,8 +156,7 @@ noicon:
/* FIXME: if statement only needed because we don't support interprocess /* FIXME: if statement only needed because we don't support interprocess
* icon handles */ * icon handles */
if (nid->uFlags & NIF_ICON) HeapFree(GetProcessHeap(), 0, buffer);
HeapFree(GetProcessHeap(), 0, cds.lpData);
return TRUE; return TRUE;
} }
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