Maarten Lankhorst : quartz: Don't free a null media type in the file source .
Alexandre Julliard
julliard at winehq.org
Wed Apr 9 05:31:30 CDT 2008
Module: wine
Branch: master
Commit: 4763e83b60528a8564332d3ba18c51d3e4509f6c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4763e83b60528a8564332d3ba18c51d3e4509f6c
Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date: Mon Apr 7 22:31:15 2008 -0700
quartz: Don't free a null media type in the file source.
---
dlls/quartz/filesource.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c
index fd977f9..b2d6838 100644
--- a/dlls/quartz/filesource.c
+++ b/dlls/quartz/filesource.c
@@ -96,6 +96,7 @@ static HRESULT process_extensions(HKEY hkeyExtensions, LPCOLESTR pszFileName, GU
size = sizeof(keying);
if (!l)
l = RegQueryValueExW(hsub, subtype_name, NULL, NULL, (LPBYTE)keying, &size);
+
if (!l)
CLSIDFromString(keying, minorType);
@@ -433,7 +434,8 @@ static ULONG WINAPI AsyncReader_Release(IBaseFilter * iface)
DeleteCriticalSection(&This->csFilter);
This->lpVtbl = NULL;
CoTaskMemFree(This->pszFileName);
- FreeMediaType(This->pmt);
+ if (This->pmt)
+ FreeMediaType(This->pmt);
CoTaskMemFree(This);
return 0;
}
@@ -681,7 +683,8 @@ static HRESULT WINAPI FileSource_Load(IFileSourceFilter * iface, LPCOLESTR pszFi
}
CoTaskMemFree(This->pszFileName);
- FreeMediaType(This->pmt);
+ if (This->pmt)
+ FreeMediaType(This->pmt);
This->pszFileName = NULL;
This->pmt = NULL;
More information about the wine-cvs
mailing list