Allan Tong : shell32: Fix a memory leak.
Alexandre Julliard
julliard at winehq.org
Mon Oct 15 11:28:10 CDT 2007
Module: wine
Branch: master
Commit: 155cd24fd5369e726556621456f9d4967328f9cd
URL: http://source.winehq.org/git/wine.git/?a=commit;h=155cd24fd5369e726556621456f9d4967328f9cd
Author: Allan Tong <actong88 at gmail.com>
Date: Sun Oct 14 04:05:37 2007 -0400
shell32: Fix a memory leak.
---
dlls/shell32/systray.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/shell32/systray.c b/dlls/shell32/systray.c
index 2258eb9..cb67fd8 100644
--- a/dlls/shell32/systray.c
+++ b/dlls/shell32/systray.c
@@ -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);
More information about the wine-cvs
mailing list