Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0d84ccbf
Commit
0d84ccbf
authored
May 20, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Fix a bitmap leak when setting the small icon hints.
parent
224af0d0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
window.c
dlls/winex11.drv/window.c
+6
-6
No files found.
dlls/winex11.drv/window.c
View file @
0d84ccbf
...
...
@@ -928,12 +928,12 @@ static void set_icon_hints( Display *display, struct x11drv_win_data *data,
HBITMAP
hbmOrig
;
RECT
rcMask
;
BITMAP
bm
;
ICONINFO
ii
;
ICONINFO
ii
,
ii_small
;
HDC
hDC
;
unsigned
int
size
;
unsigned
long
*
bits
;
GetIconInfo
(
icon_big
,
&
ii
)
;
if
(
!
GetIconInfo
(
icon_big
,
&
ii
))
return
;
GetObjectW
(
ii
.
hbmMask
,
sizeof
(
bm
),
&
bm
);
rcMask
.
top
=
0
;
...
...
@@ -943,12 +943,12 @@ static void set_icon_hints( Display *display, struct x11drv_win_data *data,
hDC
=
CreateCompatibleDC
(
0
);
bits
=
get_bitmap_argb
(
hDC
,
ii
.
hbmColor
,
ii
.
hbmMask
,
&
size
);
if
(
GetIconInfo
(
icon_small
,
&
ii
))
if
(
bits
&&
GetIconInfo
(
icon_small
,
&
ii_small
))
{
unsigned
int
size_small
;
unsigned
long
*
bits_small
,
*
new
;
if
((
bits_small
=
get_bitmap_argb
(
hDC
,
ii
.
hbmColor
,
ii
.
hbmMask
,
&
size_small
))
&&
if
((
bits_small
=
get_bitmap_argb
(
hDC
,
ii
_small
.
hbmColor
,
ii_small
.
hbmMask
,
&
size_small
))
&&
(
bits_small
[
0
]
!=
bits
[
0
]
||
bits_small
[
1
]
!=
bits
[
1
]))
/* size must be different */
{
if
((
new
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
bits
,
...
...
@@ -960,8 +960,8 @@ static void set_icon_hints( Display *display, struct x11drv_win_data *data,
}
}
HeapFree
(
GetProcessHeap
(),
0
,
bits_small
);
DeleteObject
(
ii
.
hbmColor
);
DeleteObject
(
ii
.
hbmMask
);
DeleteObject
(
ii
_small
.
hbmColor
);
DeleteObject
(
ii
_small
.
hbmMask
);
}
wine_tsx11_lock
();
if
(
bits
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment