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
d6ce0b10
Commit
d6ce0b10
authored
May 03, 2011
by
Huw Davies
Committed by
Alexandre Julliard
May 03, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Always clone the return pidl to avoid a double free if the selection is…
shell32: Always clone the return pidl to avoid a double free if the selection is changed during teardown.
parent
8eb6b8bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
brsfolder.c
dlls/shell32/brsfolder.c
+5
-3
No files found.
dlls/shell32/brsfolder.c
View file @
d6ce0b10
...
...
@@ -558,7 +558,8 @@ static HRESULT BrsFolder_Treeview_Changed( browse_info *info, NMTREEVIEWW *pnmtv
LPTV_ITEMDATA
lptvid
=
(
LPTV_ITEMDATA
)
pnmtv
->
itemNew
.
lParam
;
lptvid
=
(
LPTV_ITEMDATA
)
pnmtv
->
itemNew
.
lParam
;
info
->
pidlRet
=
lptvid
->
lpifq
;
ILFree
(
info
->
pidlRet
);
info
->
pidlRet
=
ILClone
(
lptvid
->
lpifq
);
browsefolder_callback
(
info
->
lpBrowseInfo
,
info
->
hWnd
,
BFFM_SELCHANGED
,
(
LPARAM
)
info
->
pidlRet
);
BrsFolder_CheckValidSelection
(
info
,
lptvid
);
...
...
@@ -676,8 +677,6 @@ static BOOL BrsFolder_OnCommand( browse_info *info, UINT id )
switch
(
id
)
{
case
IDOK
:
/* The original pidl is owned by the treeview and will be free'd. */
info
->
pidlRet
=
ILClone
(
info
->
pidlRet
);
if
(
info
->
pidlRet
==
NULL
)
/* A null pidl would mean a cancel */
info
->
pidlRet
=
_ILCreateDesktop
();
pdump
(
info
->
pidlRet
);
...
...
@@ -982,7 +981,10 @@ LPITEMIDLIST WINAPI SHBrowseForFolderW (LPBROWSEINFOW lpbi)
if
(
SUCCEEDED
(
hr
))
OleUninitialize
();
if
(
!
r
)
{
ILFree
(
info
.
pidlRet
);
return
NULL
;
}
return
info
.
pidlRet
;
}
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