From 2d05c24a1e7a9ea2f9d82c7e8fba46151bf93efb Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 14 Mar 2013 22:11:47 +0100 Subject: [PATCH] quartz: Free wszPatternString (Coverity). --- dlls/quartz/filesource.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index 95e146d8bb4..aee6d975914 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -335,12 +335,15 @@ HRESULT GetClassMediaFile(IAsyncReader * pReader, LPCOLESTR pszFileName, GUID * break; } - if (strcmpW(wszValueName, source_filter_name)==0) + if (strcmpW(wszValueName, source_filter_name)==0) { + HeapFree(GetProcessHeap(), 0, wszPatternString); continue; + } /* if it is not the source filter value */ if (process_pattern_string(wszPatternString, pReader) == S_OK) { + HeapFree(GetProcessHeap(), 0, wszPatternString); if (majorType && FAILED(CLSIDFromString(wszMajorKeyName, majorType))) break; if (minorType && FAILED(CLSIDFromString(wszMinorKeyName, minorType))) @@ -354,8 +357,8 @@ HRESULT GetClassMediaFile(IAsyncReader * pReader, LPCOLESTR pszFileName, GUID * break; } bFound = TRUE; - } - HeapFree(GetProcessHeap(), 0, wszPatternString); + } else + HeapFree(GetProcessHeap(), 0, wszPatternString); } CloseHandle(hkeyMinor); }