shell32: Fix a memory leak.

This commit is contained in:
Allan Tong 2007-10-14 04:05:37 -04:00 committed by Alexandre Julliard
parent 72ef8729e6
commit 155cd24fd5
1 changed files with 5 additions and 1 deletions

View File

@ -169,7 +169,11 @@ BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW nid)
GetBitmapBits(iconinfo.hbmMask, cbMaskBits, buffer);
buffer += cbMaskBits;
GetBitmapBits(iconinfo.hbmColor, cbColourBits, buffer);
buffer += cbColourBits;
/* Reset pointer to allocated block so it can be freed later.
* Note that cds.lpData cannot be passed to HeapFree since it
* points to nid when no icon info is found. */
buffer = cds.lpData;
DeleteObject(iconinfo.hbmMask);
DeleteObject(iconinfo.hbmColor);