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
889fe314
Commit
889fe314
authored
Dec 22, 2018
by
Sven Baars
Committed by
Alexandre Julliard
Dec 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Fix some memory leaks (Valgrind).
Signed-off-by:
Sven Baars
<
sven.wine@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ab445900
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
filesource.c
dlls/quartz/filesource.c
+3
-3
filtergraph.c
dlls/quartz/filtergraph.c
+4
-0
memallocator.c
dlls/quartz/memallocator.c
+4
-1
No files found.
dlls/quartz/filesource.c
View file @
889fe314
...
...
@@ -493,7 +493,7 @@ static ULONG WINAPI AsyncReader_Release(IBaseFilter * iface)
}
CoTaskMemFree
(
This
->
pszFileName
);
if
(
This
->
pmt
)
Fre
eMediaType
(
This
->
pmt
);
Delet
eMediaType
(
This
->
pmt
);
BaseFilter_Destroy
(
&
This
->
filter
);
CoTaskMemFree
(
This
);
return
0
;
...
...
@@ -610,7 +610,7 @@ static HRESULT WINAPI FileSource_Load(IFileSourceFilter * iface, LPCOLESTR pszFi
{
CoTaskMemFree
(
This
->
pszFileName
);
if
(
This
->
pmt
)
Fre
eMediaType
(
This
->
pmt
);
Delet
eMediaType
(
This
->
pmt
);
This
->
pszFileName
=
CoTaskMemAlloc
((
strlenW
(
pszFileName
)
+
1
)
*
sizeof
(
WCHAR
));
strcpyW
(
This
->
pszFileName
,
pszFileName
);
...
...
@@ -650,7 +650,7 @@ static HRESULT WINAPI FileSource_Load(IFileSourceFilter * iface, LPCOLESTR pszFi
CoTaskMemFree
(
This
->
pszFileName
);
if
(
This
->
pmt
)
Fre
eMediaType
(
This
->
pmt
);
Delet
eMediaType
(
This
->
pmt
);
This
->
pszFileName
=
NULL
;
This
->
pmt
=
NULL
;
...
...
dlls/quartz/filtergraph.c
View file @
889fe314
...
...
@@ -687,6 +687,7 @@ static HRESULT WINAPI FilterGraph2_RemoveFilter(IFilterGraph2 *iface, IBaseFilte
IBaseFilter_SetSyncSource
(
pFilter
,
NULL
);
IBaseFilter_Release
(
pFilter
);
list_remove
(
&
entry
->
entry
);
CoTaskMemFree
(
entry
->
name
);
heap_free
(
entry
);
This
->
version
++
;
/* Invalidate interfaces in the cache */
...
...
@@ -1801,6 +1802,9 @@ static HRESULT WINAPI FilterGraph2_AddSourceFilter(IFilterGraph2 *iface, LPCWSTR
TRACE
(
"MajorType %s
\n
"
,
debugstr_guid
(
&
mt
.
majortype
));
TRACE
(
"SubType %s
\n
"
,
debugstr_guid
(
&
mt
.
subtype
));
CoTaskMemFree
(
filename
);
FreeMediaType
(
&
mt
);
if
(
ppFilter
)
*
ppFilter
=
preader
;
IFileSourceFilter_Release
(
pfile
);
...
...
dlls/quartz/memallocator.c
View file @
889fe314
...
...
@@ -444,6 +444,9 @@ static HRESULT StdMediaSample2_Construct(BYTE * pbBuffer, LONG cbBuffer, IMemAll
static
void
StdMediaSample2_Delete
(
StdMediaSample2
*
This
)
{
if
(
This
->
props
.
pMediaType
)
DeleteMediaType
(
This
->
props
.
pMediaType
);
/* NOTE: does not remove itself from the list it belongs to */
CoTaskMemFree
(
This
);
}
...
...
@@ -676,7 +679,7 @@ static HRESULT WINAPI StdMediaSample2_SetMediaType(IMediaSample2 * iface, AM_MED
if
(
This
->
props
.
pMediaType
)
{
Fre
eMediaType
(
This
->
props
.
pMediaType
);
Delet
eMediaType
(
This
->
props
.
pMediaType
);
This
->
props
.
pMediaType
=
NULL
;
}
if
(
!
pMediaType
)
...
...
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