From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winex11.drv/systray.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/winex11.drv/systray.c b/dlls/winex11.drv/systray.c index 3ef654aa424..9ba6abdd6f5 100644 --- a/dlls/winex11.drv/systray.c +++ b/dlls/winex11.drv/systray.c @@ -360,7 +360,7 @@ static void repaint_tray_icon( struct icon *icon ) pos.x = (size.cx - width) / 2; pos.y = (size.cy - height) / 2;
- info = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, FIELD_OFFSET( BITMAPINFO, bmiColors[2] )); + info = calloc( 1, FIELD_OFFSET( BITMAPINFO, bmiColors[2] )); if (!info) return; info->bmiHeader.biSize = sizeof(info->bmiHeader); info->bmiHeader.biWidth = size.cx; @@ -408,7 +408,7 @@ static void repaint_tray_icon( struct icon *icon )
UpdateLayeredWindow( icon->window, 0, NULL, NULL, hdc, NULL, 0, &blend, ULW_ALPHA ); done: - HeapFree (GetProcessHeap(), 0, info); + free(info); if (hdc) DeleteDC( hdc ); if (dib) DeleteObject( dib ); } @@ -695,7 +695,7 @@ static BOOL add_icon(NOTIFYICONDATAW *nid) return FALSE; }
- if (!(icon = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*icon)))) + if (!(icon = calloc(1, sizeof(*icon)))) { ERR("out of memory\n"); return FALSE; @@ -717,7 +717,7 @@ static BOOL delete_icon( struct icon *icon ) hide_icon( icon ); list_remove( &icon->entry ); DestroyIcon( icon->image ); - HeapFree( GetProcessHeap(), 0, icon ); + free( icon ); return TRUE; }