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
7b89ff88
Commit
7b89ff88
authored
Oct 06, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Oct 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
janitorial: Remove redundant NULL checks before SHFree.
parent
99e2c6df
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
15 additions
and
47 deletions
+15
-47
brsfolder.c
dlls/shell32/brsfolder.c
+0
-2
changenotify.c
dlls/shell32/changenotify.c
+2
-2
cpanelfolder.c
dlls/shell32/cpanelfolder.c
+0
-1
dataobject.c
dlls/shell32/dataobject.c
+0
-3
pidl.c
dlls/shell32/pidl.c
+0
-5
shell.c
dlls/shell32/shell.c
+4
-4
shell32_main.c
dlls/shell32/shell32_main.c
+0
-1
shfldr_desktop.c
dlls/shell32/shfldr_desktop.c
+0
-2
shfldr_fs.c
dlls/shell32/shfldr_fs.c
+0
-6
shfldr_mycomp.c
dlls/shell32/shfldr_mycomp.c
+0
-1
shlexec.c
dlls/shell32/shlexec.c
+7
-7
shlmenu.c
dlls/shell32/shlmenu.c
+2
-7
shlview.c
dlls/shell32/shlview.c
+0
-4
shv_item_cmenu.c
dlls/shell32/shv_item_cmenu.c
+0
-1
trash.c
dlls/shell32/trash.c
+0
-1
No files found.
dlls/shell32/brsfolder.c
View file @
7b89ff88
...
...
@@ -354,8 +354,6 @@ static void FillTreeView( browse_info *info, IShellFolder * lpsf,
done:
ReleaseCapture
();
SetCursor
(
LoadCursorW
(
0
,
(
LPWSTR
)
IDC_ARROW
));
if
(
pidlTemp
)
SHFree
(
pidlTemp
);
}
...
...
dlls/shell32/changenotify.c
View file @
7b89ff88
...
...
@@ -402,8 +402,8 @@ void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID
/* if we allocated it, free it. The ANSI flag is also set in its Unicode sibling. */
if
((
typeFlag
&
SHCNF_PATHA
)
||
(
typeFlag
&
SHCNF_PRINTERA
))
{
if
(
Pidls
[
0
])
SHFree
((
LPITEMIDLIST
)
Pidls
[
0
]);
if
(
Pidls
[
1
])
SHFree
((
LPITEMIDLIST
)
Pidls
[
1
]);
SHFree
((
LPITEMIDLIST
)
Pidls
[
0
]);
SHFree
((
LPITEMIDLIST
)
Pidls
[
1
]);
}
}
...
...
dlls/shell32/cpanelfolder.c
View file @
7b89ff88
...
...
@@ -203,7 +203,6 @@ static ULONG WINAPI ISF_ControlPanel_fnRelease(IShellFolder2 * iface)
if
(
!
refCount
)
{
TRACE
(
"-- destroying IShellFolder(%p)
\n
"
,
This
);
if
(
This
->
pidlRoot
)
SHFree
(
This
->
pidlRoot
);
LocalFree
((
HLOCAL
)
This
);
}
...
...
dlls/shell32/dataobject.c
View file @
7b89ff88
...
...
@@ -97,10 +97,7 @@ static ULONG WINAPI IEnumFORMATETC_fnRelease(LPENUMFORMATETC iface)
if
(
!
refCount
)
{
TRACE
(
" destroying IEnumFORMATETC(%p)
\n
"
,
This
);
if
(
This
->
pFmt
)
{
SHFree
(
This
->
pFmt
);
}
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
0
;
}
...
...
dlls/shell32/pidl.c
View file @
7b89ff88
...
...
@@ -291,11 +291,8 @@ HRESULT WINAPI ILLoadFromStream (IStream * pStream, LPITEMIDLIST * ppPidl)
TRACE_
(
shell
)(
"%p %p
\n
"
,
pStream
,
ppPidl
);
if
(
*
ppPidl
)
{
SHFree
(
*
ppPidl
);
*
ppPidl
=
NULL
;
}
IStream_AddRef
(
pStream
);
...
...
@@ -865,7 +862,6 @@ LPITEMIDLIST WINAPI ILAppend(LPITEMIDLIST pidl, LPCITEMIDLIST item, BOOL bEnd)
if
(
_ILIsDesktop
(
pidl
))
{
idlRet
=
ILClone
(
item
);
if
(
pidl
)
SHFree
(
pidl
);
return
idlRet
;
}
...
...
@@ -896,7 +892,6 @@ LPITEMIDLIST WINAPI ILAppend(LPITEMIDLIST pidl, LPCITEMIDLIST item, BOOL bEnd)
void
WINAPI
ILFree
(
LPITEMIDLIST
pidl
)
{
TRACE
(
"(pidl=%p)
\n
"
,
pidl
);
if
(
pidl
)
SHFree
(
pidl
);
}
...
...
dlls/shell32/shell.c
View file @
7b89ff88
...
...
@@ -628,10 +628,10 @@ HINSTANCE16 WINAPI ShellExecute16( HWND16 hWnd, LPCSTR lpOperation,
SHELL_execute
(
&
seiW
,
SHELL_Execute16
);
if
(
wVerb
)
SHFree
(
wVerb
);
if
(
wFile
)
SHFree
(
wFile
);
if
(
wParameters
)
SHFree
(
wParameters
);
if
(
wDirectory
)
SHFree
(
wDirectory
);
SHFree
(
wVerb
);
SHFree
(
wFile
);
SHFree
(
wParameters
);
SHFree
(
wDirectory
);
return
HINSTANCE_16
(
seiW
.
hInstApp
);
}
dlls/shell32/shell32_main.c
View file @
7b89ff88
...
...
@@ -614,7 +614,6 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
if
(
hr
!=
S_OK
)
ret
=
FALSE
;
if
(
pidlLast
)
SHFree
(
pidlLast
);
#ifdef MORE_DEBUG
...
...
dlls/shell32/shfldr_desktop.c
View file @
7b89ff88
...
...
@@ -137,9 +137,7 @@ static ULONG WINAPI ISF_Desktop_fnRelease (IShellFolder2 * iface)
if
(
!
refCount
)
{
TRACE
(
"-- destroying IShellFolder(%p)
\n
"
,
This
);
if
(
This
->
pidlRoot
)
SHFree
(
This
->
pidlRoot
);
if
(
This
->
sPathTarget
)
SHFree
(
This
->
sPathTarget
);
LocalFree
((
HLOCAL
)
This
);
return
0
;
...
...
dlls/shell32/shfldr_fs.c
View file @
7b89ff88
...
...
@@ -194,9 +194,7 @@ static ULONG WINAPI IUnknown_fnRelease (IUnknown * iface)
if
(
!
refCount
)
{
TRACE
(
"-- destroying IShellFolder(%p)
\n
"
,
This
);
if
(
This
->
pidlRoot
)
SHFree
(
This
->
pidlRoot
);
if
(
This
->
sPathTarget
)
SHFree
(
This
->
sPathTarget
);
LocalFree
((
HLOCAL
)
This
);
}
...
...
@@ -1380,15 +1378,11 @@ IFSFldr_PersistFolder3_Initialize (IPersistFolder3 * iface, LPCITEMIDLIST pidl)
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pidl
);
if
(
This
->
pidlRoot
)
SHFree
(
This
->
pidlRoot
);
/* free the old pidl */
This
->
pidlRoot
=
ILClone
(
pidl
);
/* set my pidl */
if
(
This
->
sPathTarget
)
{
SHFree
(
This
->
sPathTarget
);
This
->
sPathTarget
=
NULL
;
}
/* set my path */
if
(
SHGetPathFromIDListW
(
pidl
,
wszTemp
))
{
...
...
dlls/shell32/shfldr_mycomp.c
View file @
7b89ff88
...
...
@@ -186,7 +186,6 @@ static ULONG WINAPI ISF_MyComputer_fnRelease (IShellFolder2 * iface)
if
(
!
refCount
)
{
TRACE
(
"-- destroying IShellFolder(%p)
\n
"
,
This
);
if
(
This
->
pidlRoot
)
SHFree
(
This
->
pidlRoot
);
LocalFree
((
HLOCAL
)
This
);
}
...
...
dlls/shell32/shlexec.c
View file @
7b89ff88
...
...
@@ -882,8 +882,8 @@ HINSTANCE WINAPI FindExecutableA(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResu
retval
=
FindExecutableW
(
wFile
,
wDirectory
,
wResult
);
WideCharToMultiByte
(
CP_ACP
,
0
,
wResult
,
-
1
,
lpResult
,
MAX_PATH
,
NULL
,
NULL
);
if
(
wFile
)
SHFree
(
wFile
);
if
(
wDirectory
)
SHFree
(
wDirectory
);
SHFree
(
wFile
);
SHFree
(
wDirectory
);
TRACE
(
"returning %s
\n
"
,
lpResult
);
return
retval
;
...
...
@@ -1580,11 +1580,11 @@ BOOL WINAPI ShellExecuteExA (LPSHELLEXECUTEINFOA sei)
if
(
sei
->
fMask
&
SEE_MASK_NOCLOSEPROCESS
)
sei
->
hProcess
=
seiW
.
hProcess
;
if
(
wVerb
)
SHFree
(
wVerb
);
if
(
wFile
)
SHFree
(
wFile
);
if
(
wParameters
)
SHFree
(
wParameters
);
if
(
wDirectory
)
SHFree
(
wDirectory
);
if
(
wClass
)
SHFree
(
wClass
);
SHFree
(
wVerb
);
SHFree
(
wFile
);
SHFree
(
wParameters
);
SHFree
(
wDirectory
);
SHFree
(
wClass
);
return
ret
;
}
...
...
dlls/shell32/shlmenu.c
View file @
7b89ff88
...
...
@@ -115,9 +115,7 @@ static LPFMINFO FM_SetMenuParameter(
menudata
=
FM_GetMenuInfo
(
hmenu
);
if
(
menudata
->
pidl
)
{
SHFree
(
menudata
->
pidl
);
}
SHFree
(
menudata
->
pidl
);
menudata
->
uID
=
uID
;
menudata
->
pidl
=
ILClone
(
pidl
);
...
...
@@ -299,9 +297,7 @@ void WINAPI FileMenu_Destroy (HMENU hmenu)
menudata
=
FM_GetMenuInfo
(
hmenu
);
if
(
menudata
->
pidl
)
{
SHFree
(
menudata
->
pidl
);
}
SHFree
(
menudata
->
pidl
);
HeapFree
(
GetProcessHeap
(),
0
,
menudata
);
DestroyMenu
(
hmenu
);
...
...
@@ -692,7 +688,6 @@ BOOL WINAPI FileMenu_DeleteAllItems (HMENU hmenu)
for
(
i
=
0
;
i
<
GetMenuItemCount
(
hmenu
);
i
++
)
{
GetMenuItemInfoW
(
hmenu
,
i
,
TRUE
,
&
mii
);
if
(
mii
.
dwItemData
)
SHFree
((
LPFMINFO
)
mii
.
dwItemData
);
if
(
mii
.
hSubMenu
)
...
...
dlls/shell32/shlview.c
View file @
7b89ff88
...
...
@@ -811,10 +811,7 @@ static UINT ShellView_GetSelections(IShellViewImpl * This)
LVITEMA
lvItem
;
UINT
i
=
0
;
if
(
This
->
apidl
)
{
SHFree
(
This
->
apidl
);
}
This
->
cidl
=
ListView_GetSelectedCount
(
This
->
hWndList
);
This
->
apidl
=
(
LPITEMIDLIST
*
)
SHAlloc
(
This
->
cidl
*
sizeof
(
LPITEMIDLIST
));
...
...
@@ -1713,7 +1710,6 @@ static ULONG WINAPI IShellView_fnRelease(IShellView * iface)
if
(
This
->
pSF2Parent
)
IShellFolder2_Release
(
This
->
pSF2Parent
);
if
(
This
->
apidl
)
SHFree
(
This
->
apidl
);
if
(
This
->
pAdvSink
)
...
...
dlls/shell32/shv_item_cmenu.c
View file @
7b89ff88
...
...
@@ -166,7 +166,6 @@ static ULONG WINAPI ISvItemCm_fnRelease(IContextMenu2 *iface)
if
(
This
->
pSFParent
)
IShellFolder_Release
(
This
->
pSFParent
);
if
(
This
->
pidl
)
SHFree
(
This
->
pidl
);
/*make sure the pidl is freed*/
...
...
dlls/shell32/trash.c
View file @
7b89ff88
...
...
@@ -377,7 +377,6 @@ HRESULT TRASH_UnpackItemID(LPCSHITEMID id, TRASH_ELEMENT *element, WIN32_FIND_DA
void
TRASH_DisposeElement
(
TRASH_ELEMENT
*
element
)
{
if
(
element
)
SHFree
(
element
->
filename
);
}
...
...
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