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
1e662d92
Commit
1e662d92
authored
Jul 08, 2016
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 08, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qedit: Remove redundant NULL checks before CoTaskMemFree().
Signed-off-by:
Michael Stefaniuc
<
mstefani@redhat.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5287add1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
samplegrabber.c
dlls/qedit/samplegrabber.c
+6
-12
No files found.
dlls/qedit/samplegrabber.c
View file @
1e662d92
...
...
@@ -89,8 +89,7 @@ static ULONG WINAPI Single_IEnumMediaTypes_Release(IEnumMediaTypes *iface)
TRACE
(
"(%p) new ref = %u
\n
"
,
This
,
refCount
);
if
(
refCount
==
0
)
{
if
(
This
->
mtype
.
pbFormat
)
CoTaskMemFree
(
This
->
mtype
.
pbFormat
);
CoTaskMemFree
(
This
->
mtype
.
pbFormat
);
CoTaskMemFree
(
This
);
}
return
refCount
;
...
...
@@ -276,10 +275,8 @@ static void SampleGrabber_cleanup(SG_Impl *This)
IMemInputPin_Release
(
This
->
memOutput
);
if
(
This
->
grabberIface
)
ISampleGrabberCB_Release
(
This
->
grabberIface
);
if
(
This
->
mtype
.
pbFormat
)
CoTaskMemFree
(
This
->
mtype
.
pbFormat
);
if
(
This
->
bufferData
)
CoTaskMemFree
(
This
->
bufferData
);
CoTaskMemFree
(
This
->
mtype
.
pbFormat
);
CoTaskMemFree
(
This
->
bufferData
);
if
(
This
->
seekthru_unk
)
IUnknown_Release
(
This
->
seekthru_unk
);
}
...
...
@@ -384,8 +381,7 @@ static void SampleGrabber_callback(SG_Impl *This, IMediaSample *sample)
size
=
0
;
EnterCriticalSection
(
&
This
->
filter
.
csFilter
);
if
(
This
->
bufferLen
!=
size
)
{
if
(
This
->
bufferData
)
CoTaskMemFree
(
This
->
bufferData
);
CoTaskMemFree
(
This
->
bufferData
);
This
->
bufferData
=
size
?
CoTaskMemAlloc
(
size
)
:
NULL
;
This
->
bufferLen
=
size
;
}
...
...
@@ -586,8 +582,7 @@ SampleGrabber_ISampleGrabber_SetMediaType(ISampleGrabber *iface, const AM_MEDIA_
debugstr_guid
(
&
type
->
majortype
),
debugstr_guid
(
&
type
->
subtype
),
type
->
lSampleSize
,
debugstr_guid
(
&
type
->
formattype
),
type
->
cbFormat
);
if
(
This
->
mtype
.
pbFormat
)
CoTaskMemFree
(
This
->
mtype
.
pbFormat
);
CoTaskMemFree
(
This
->
mtype
.
pbFormat
);
This
->
mtype
=
*
type
;
This
->
mtype
.
pUnk
=
NULL
;
if
(
type
->
cbFormat
)
{
...
...
@@ -936,8 +931,7 @@ SampleGrabber_In_IPin_ReceiveConnection(IPin *iface, IPin *connector, const AM_M
!
IsEqualGUID
(
&
This
->
sg
->
mtype
.
formattype
,
&
FORMAT_None
)
&&
!
IsEqualGUID
(
&
This
->
sg
->
mtype
.
formattype
,
&
type
->
formattype
))
return
VFW_E_TYPE_NOT_ACCEPTED
;
if
(
This
->
sg
->
mtype
.
pbFormat
)
CoTaskMemFree
(
This
->
sg
->
mtype
.
pbFormat
);
CoTaskMemFree
(
This
->
sg
->
mtype
.
pbFormat
);
This
->
sg
->
mtype
=
*
type
;
This
->
sg
->
mtype
.
pUnk
=
NULL
;
if
(
type
->
cbFormat
)
{
...
...
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