Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
5facde47
Commit
5facde47
authored
Sep 18, 2006
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Sep 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: toolbar: Don't leak the intoPtr->bitmaps during resizing and destruction.
parent
5564266a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
11 deletions
+2
-11
toolbar.c
dlls/comctl32/toolbar.c
+2
-11
No files found.
dlls/comctl32/toolbar.c
View file @
5facde47
...
...
@@ -2751,17 +2751,7 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
TRACE
(
"Number of bitmap infos: %d
\n
"
,
infoPtr
->
nNumBitmapInfos
);
if
(
infoPtr
->
nNumBitmapInfos
==
0
)
{
infoPtr
->
bitmaps
=
Alloc
(
sizeof
(
TBITMAP_INFO
));
}
else
{
TBITMAP_INFO
*
oldBitmaps
=
infoPtr
->
bitmaps
;
infoPtr
->
bitmaps
=
Alloc
((
infoPtr
->
nNumBitmapInfos
+
1
)
*
sizeof
(
TBITMAP_INFO
));
memcpy
(
&
infoPtr
->
bitmaps
[
0
],
&
oldBitmaps
[
0
],
infoPtr
->
nNumBitmapInfos
*
sizeof
(
TBITMAP_INFO
));
}
infoPtr
->
bitmaps
=
ReAlloc
(
infoPtr
->
bitmaps
,
(
infoPtr
->
nNumBitmapInfos
+
1
)
*
sizeof
(
TBITMAP_INFO
));
infoPtr
->
bitmaps
[
infoPtr
->
nNumBitmapInfos
].
nButtons
=
nButtons
;
infoPtr
->
bitmaps
[
infoPtr
->
nNumBitmapInfos
].
hInst
=
lpAddBmp
->
hInst
;
infoPtr
->
bitmaps
[
infoPtr
->
nNumBitmapInfos
].
nID
=
lpAddBmp
->
nID
;
...
...
@@ -5672,6 +5662,7 @@ TOOLBAR_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
/* delete temporary buffer for tooltip text */
Free
(
infoPtr
->
pszTooltipText
);
Free
(
infoPtr
->
bitmaps
);
/* bitmaps list */
/* delete button data */
if
(
infoPtr
->
buttons
)
...
...
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