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
45bd38ec
Commit
45bd38ec
authored
Apr 04, 2008
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Apr 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Fix some memory leaks in the file source.
parent
d56c50c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
filesource.c
dlls/quartz/filesource.c
+9
-0
No files found.
dlls/quartz/filesource.c
View file @
45bd38ec
...
...
@@ -432,6 +432,8 @@ static ULONG WINAPI AsyncReader_Release(IBaseFilter * iface)
This
->
csFilter
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
This
->
csFilter
);
This
->
lpVtbl
=
NULL
;
CoTaskMemFree
(
This
->
pszFileName
);
FreeMediaType
(
This
->
pmt
);
CoTaskMemFree
(
This
);
return
0
;
}
...
...
@@ -639,8 +641,13 @@ static HRESULT WINAPI FileSource_Load(IFileSourceFilter * iface, LPCOLESTR pszFi
/* store file name & media type */
if
(
SUCCEEDED
(
hr
))
{
CoTaskMemFree
(
This
->
pszFileName
);
if
(
This
->
pmt
)
FreeMediaType
(
This
->
pmt
);
This
->
pszFileName
=
CoTaskMemAlloc
((
strlenW
(
pszFileName
)
+
1
)
*
sizeof
(
WCHAR
));
strcpyW
(
This
->
pszFileName
,
pszFileName
);
This
->
pmt
=
CoTaskMemAlloc
(
sizeof
(
AM_MEDIA_TYPE
));
if
(
!
pmt
)
{
...
...
@@ -674,7 +681,9 @@ static HRESULT WINAPI FileSource_Load(IFileSourceFilter * iface, LPCOLESTR pszFi
}
CoTaskMemFree
(
This
->
pszFileName
);
FreeMediaType
(
This
->
pmt
);
This
->
pszFileName
=
NULL
;
This
->
pmt
=
NULL
;
CloseHandle
(
hFile
);
}
...
...
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