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
99e2c6df
Commit
99e2c6df
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 CoTaskMemFree (found by Smatch).
parent
29a55bd5
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
62 deletions
+31
-62
devenum_main.c
dlls/devenum/devenum_main.c
+1
-3
parsedisplayname.c
dlls/devenum/parsedisplayname.c
+1
-2
dmort.c
dlls/msdmo/dmort.c
+2
-5
usrmarshal.c
dlls/oleaut32/usrmarshal.c
+1
-2
enummedia.c
dlls/qcap/enummedia.c
+3
-5
filesource.c
dlls/quartz/filesource.c
+6
-11
filtermapper.c
dlls/quartz/filtermapper.c
+17
-34
No files found.
dlls/devenum/devenum_main.c
View file @
99e2c6df
...
...
@@ -278,9 +278,7 @@ HRESULT WINAPI DllRegisterServer(void)
if
(
hkeyClsid
)
RegCloseKey
(
hkeyClsid
);
if
(
pszClsidDevMon
)
CoTaskMemFree
(
pszClsidDevMon
);
CoTaskMemFree
(
pszClsidDevMon
);
CoUninitialize
();
return
res
;
...
...
dlls/devenum/parsedisplayname.c
View file @
99e2c6df
...
...
@@ -147,8 +147,7 @@ static HRESULT WINAPI DEVENUM_IParseDisplayName_ParseDisplayName(
if
(
pEm
)
IEnumMoniker_Release
(
pEm
);
if
(
pszClass
)
CoTaskMemFree
(
pszClass
);
CoTaskMemFree
(
pszClass
);
TRACE
(
"-- returning: %lx
\n
"
,
res
);
return
res
;
...
...
dlls/msdmo/dmort.c
View file @
99e2c6df
...
...
@@ -121,11 +121,8 @@ HRESULT WINAPI MoFreeMediaType(DMO_MEDIA_TYPE* pmedia)
pmedia
->
pUnk
=
NULL
;
}
if
(
pmedia
->
pbFormat
)
{
CoTaskMemFree
(
pmedia
->
pbFormat
);
pmedia
->
pbFormat
=
NULL
;
}
CoTaskMemFree
(
pmedia
->
pbFormat
);
pmedia
->
pbFormat
=
NULL
;
return
S_OK
;
}
...
...
dlls/oleaut32/usrmarshal.c
View file @
99e2c6df
...
...
@@ -1726,8 +1726,7 @@ void CALLBACK ITypeInfo_ReleaseVarDesc_Proxy(
{
TRACE
(
"(%p, %p)
\n
"
,
This
,
pVarDesc
);
if
(
pVarDesc
->
lpstrSchema
)
CoTaskMemFree
(
pVarDesc
->
lpstrSchema
);
CoTaskMemFree
(
pVarDesc
->
lpstrSchema
);
if
(
pVarDesc
->
varkind
==
VAR_CONST
)
CoTaskMemFree
(
pVarDesc
->
u
.
lpvarValue
);
...
...
dlls/qcap/enummedia.c
View file @
99e2c6df
...
...
@@ -47,11 +47,9 @@ HRESULT CopyMediaType(AM_MEDIA_TYPE * pDest, const AM_MEDIA_TYPE *pSrc)
void
FreeMediaType
(
AM_MEDIA_TYPE
*
pMediaType
)
{
if
(
pMediaType
->
pbFormat
)
{
CoTaskMemFree
(
pMediaType
->
pbFormat
);
pMediaType
->
pbFormat
=
NULL
;
}
CoTaskMemFree
(
pMediaType
->
pbFormat
);
pMediaType
->
pbFormat
=
NULL
;
if
(
pMediaType
->
pUnk
)
{
IUnknown_Release
(
pMediaType
->
pUnk
);
...
...
dlls/quartz/filesource.c
View file @
99e2c6df
...
...
@@ -620,11 +620,10 @@ static HRESULT WINAPI FileSource_Load(IFileSourceFilter * iface, LPCOLESTR pszFi
IPin_Release
(
This
->
pOutputPin
);
This
->
pOutputPin
=
NULL
;
}
if
(
This
->
pszFileName
)
{
CoTaskMemFree
(
This
->
pszFileName
);
This
->
pszFileName
=
NULL
;
}
CoTaskMemFree
(
This
->
pszFileName
);
This
->
pszFileName
=
NULL
;
CloseHandle
(
hFile
);
}
...
...
@@ -1079,12 +1078,8 @@ static HRESULT WINAPI FileAsyncReader_WaitForNext(IAsyncReader * iface, DWORD dw
*
pdwUser
=
pDataRq
->
dwUserData
;
}
/* clean up */
if
(
pDataRq
)
{
/* no need to close event handle since we will close it when the pin is destroyed */
CoTaskMemFree
(
pDataRq
);
}
/* no need to close event handle since we will close it when the pin is destroyed */
CoTaskMemFree
(
pDataRq
);
TRACE
(
"-- %lx
\n
"
,
hr
);
return
hr
;
...
...
dlls/quartz/filtermapper.c
View file @
99e2c6df
...
...
@@ -152,8 +152,7 @@ static int find_data(struct Vector * v, const BYTE * pData, int size)
static
void
delete_vector
(
struct
Vector
*
v
)
{
if
(
v
->
pData
)
CoTaskMemFree
(
v
->
pData
);
CoTaskMemFree
(
v
->
pData
);
v
->
current
=
0
;
v
->
capacity
=
0
;
}
...
...
@@ -288,11 +287,8 @@ static HRESULT WINAPI FilterMapper2_CreateCategory(
}
CloseHandle
(
hKey
);
if
(
wClsidCategory
)
CoTaskMemFree
(
wClsidCategory
);
if
(
wClsidAMCat
)
CoTaskMemFree
(
wClsidAMCat
);
CoTaskMemFree
(
wClsidCategory
);
CoTaskMemFree
(
wClsidAMCat
);
return
hr
;
}
...
...
@@ -336,10 +332,8 @@ static HRESULT WINAPI FilterMapper2_UnregisterFilter(
hr
=
HRESULT_FROM_WIN32
(
lRet
);
}
if
(
wClsidCategory
)
CoTaskMemFree
(
wClsidCategory
);
if
(
wFilter
)
CoTaskMemFree
(
wFilter
);
CoTaskMemFree
(
wClsidCategory
);
CoTaskMemFree
(
wFilter
);
return
hr
;
}
...
...
@@ -368,8 +362,7 @@ static HRESULT FM2_WriteClsid(IPropertyBag * pPropBag, REFCLSID clsid)
V_UNION
(
&
var
,
bstrVal
)
=
wszClsid
;
hr
=
IPropertyBag_Write
(
pPropBag
,
wszClsidName
,
&
var
);
}
if
(
wszClsid
)
CoTaskMemFree
(
wszClsid
);
CoTaskMemFree
(
wszClsid
);
return
hr
;
}
...
...
@@ -748,11 +741,9 @@ static HRESULT WINAPI FilterMapper2_RegisterFilter(
strcpyW
(
pCurrent
+
1
,
szInstance
);
else
{
if
(
szClsidTemp
)
{
CoTaskMemFree
(
szClsidTemp
);
szClsidTemp
=
NULL
;
}
CoTaskMemFree
(
szClsidTemp
);
szClsidTemp
=
NULL
;
hr
=
StringFromCLSID
(
clsidFilter
,
&
szClsidTemp
);
if
(
SUCCEEDED
(
hr
))
strcpyW
(
pCurrent
+
1
,
szClsidTemp
);
...
...
@@ -787,16 +778,14 @@ static HRESULT WINAPI FilterMapper2_RegisterFilter(
if
(
pPropBag
)
IPropertyBag_Release
(
pPropBag
);
if
(
szClsidTemp
)
CoTaskMemFree
(
szClsidTemp
);
CoTaskMemFree
(
szClsidTemp
);
if
(
SUCCEEDED
(
hr
)
&&
ppMoniker
)
*
ppMoniker
=
pMoniker
;
else
if
(
pMoniker
)
IMoniker_Release
(
pMoniker
);
if
(
pregfp2
)
CoTaskMemFree
(
pregfp2
);
CoTaskMemFree
(
pregfp2
);
TRACE
(
"-- returning %lx
\n
"
,
hr
);
...
...
@@ -1360,8 +1349,7 @@ static HRESULT WINAPI FilterMapper_RegisterPin(
hr
=
HRESULT_FROM_WIN32
(
lRet
);
}
if
(
wszClsid
)
CoTaskMemFree
(
wszClsid
);
CoTaskMemFree
(
wszClsid
);
if
(
hKey
)
CloseHandle
(
hKey
);
if
(
hPinsKey
)
...
...
@@ -1437,12 +1425,9 @@ static HRESULT WINAPI FilterMapper_RegisterPinType(
CloseHandle
(
hKey
);
}
if
(
wszClsid
)
CoTaskMemFree
(
wszClsid
);
if
(
wszClsidMajorType
)
CoTaskMemFree
(
wszClsidMajorType
);
if
(
wszClsidSubType
)
CoTaskMemFree
(
wszClsidSubType
);
CoTaskMemFree
(
wszClsid
);
CoTaskMemFree
(
wszClsidMajorType
);
CoTaskMemFree
(
wszClsidSubType
);
return
hr
;
}
...
...
@@ -1488,8 +1473,7 @@ static HRESULT WINAPI FilterMapper_UnregisterFilter(IFilterMapper * iface, CLSID
CloseHandle
(
hKey
);
}
if
(
wszClsid
)
CoTaskMemFree
(
wszClsid
);
CoTaskMemFree
(
wszClsid
);
return
hr
;
}
...
...
@@ -1546,8 +1530,7 @@ static HRESULT WINAPI FilterMapper_UnregisterPin(IFilterMapper * iface, CLSID Fi
CoTaskMemFree
(
wszPinNameKey
);
}
if
(
wszClsid
)
CoTaskMemFree
(
wszClsid
);
CoTaskMemFree
(
wszClsid
);
if
(
hKey
)
CloseHandle
(
hKey
);
...
...
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