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
524e316a
Commit
524e316a
authored
Apr 19, 2017
by
Huw Davies
Committed by
Alexandre Julliard
Apr 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Avoid leaking icon handles.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c7c8d24b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
iconcache.c
dlls/shell32/iconcache.c
+10
-2
No files found.
dlls/shell32/iconcache.c
View file @
524e316a
...
@@ -305,10 +305,12 @@ static INT SIC_IconAppend (LPCWSTR sSourceFile, INT dwSourceIndex, HICON hSmallI
...
@@ -305,10 +305,12 @@ static INT SIC_IconAppend (LPCWSTR sSourceFile, INT dwSourceIndex, HICON hSmallI
* gets small/big icon by number from a file
* gets small/big icon by number from a file
*/
*/
static
INT
SIC_LoadIcon
(
LPCWSTR
sSourceFile
,
INT
dwSourceIndex
,
DWORD
dwFlags
)
static
INT
SIC_LoadIcon
(
LPCWSTR
sSourceFile
,
INT
dwSourceIndex
,
DWORD
dwFlags
)
{
HICON
hiconLarge
=
0
;
{
HICON
hiconLarge
=
0
;
HICON
hiconSmall
=
0
;
HICON
hiconSmall
=
0
;
HICON
hiconLargeShortcut
;
HICON
hiconLargeShortcut
;
HICON
hiconSmallShortcut
;
HICON
hiconSmallShortcut
;
int
ret
;
PrivateExtractIconsW
(
sSourceFile
,
dwSourceIndex
,
GetSystemMetrics
(
SM_CXICON
),
PrivateExtractIconsW
(
sSourceFile
,
dwSourceIndex
,
GetSystemMetrics
(
SM_CXICON
),
GetSystemMetrics
(
SM_CYICON
),
&
hiconLarge
,
0
,
1
,
0
);
GetSystemMetrics
(
SM_CYICON
),
&
hiconLarge
,
0
,
1
,
0
);
...
@@ -327,6 +329,8 @@ static INT SIC_LoadIcon (LPCWSTR sSourceFile, INT dwSourceIndex, DWORD dwFlags)
...
@@ -327,6 +329,8 @@ static INT SIC_LoadIcon (LPCWSTR sSourceFile, INT dwSourceIndex, DWORD dwFlags)
hiconSmallShortcut
=
SIC_OverlayShortcutImage
(
hiconSmall
,
FALSE
);
hiconSmallShortcut
=
SIC_OverlayShortcutImage
(
hiconSmall
,
FALSE
);
if
(
NULL
!=
hiconLargeShortcut
&&
NULL
!=
hiconSmallShortcut
)
if
(
NULL
!=
hiconLargeShortcut
&&
NULL
!=
hiconSmallShortcut
)
{
{
DestroyIcon
(
hiconLarge
);
DestroyIcon
(
hiconSmall
);
hiconLarge
=
hiconLargeShortcut
;
hiconLarge
=
hiconLargeShortcut
;
hiconSmall
=
hiconSmallShortcut
;
hiconSmall
=
hiconSmallShortcut
;
}
}
...
@@ -339,8 +343,12 @@ static INT SIC_LoadIcon (LPCWSTR sSourceFile, INT dwSourceIndex, DWORD dwFlags)
...
@@ -339,8 +343,12 @@ static INT SIC_LoadIcon (LPCWSTR sSourceFile, INT dwSourceIndex, DWORD dwFlags)
}
}
}
}
return
SIC_IconAppend
(
sSourceFile
,
dwSourceIndex
,
hiconSmall
,
hiconLarge
,
dwFlags
);
ret
=
SIC_IconAppend
(
sSourceFile
,
dwSourceIndex
,
hiconSmall
,
hiconLarge
,
dwFlags
);
DestroyIcon
(
hiconLarge
);
DestroyIcon
(
hiconSmall
);
return
ret
;
}
}
/*****************************************************************************
/*****************************************************************************
* SIC_Initialize [internal]
* SIC_Initialize [internal]
*/
*/
...
...
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