From 119d7caf79674988df6b57f6e0ee766031270ab8 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Thu, 17 Apr 2008 11:33:35 -0700 Subject: [PATCH] quartz: Fix theoretical memory leak. --- dlls/quartz/avisplit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/quartz/avisplit.c b/dlls/quartz/avisplit.c index 89c02d45e0b..a619dcf21a9 100644 --- a/dlls/quartz/avisplit.c +++ b/dlls/quartz/avisplit.c @@ -525,13 +525,14 @@ static HRESULT AVISplitter_ProcessStreamList(AVISplitterImpl * This, const BYTE stream->streamheader = *pStrHdr; fSamplesPerSec = (float)pStrHdr->dwRate / (float)pStrHdr->dwScale; + CoTaskMemFree(amt.pbFormat); + amt.pbFormat = NULL; + amt.cbFormat = 0; switch (pStrHdr->fccType) { case streamtypeVIDEO: amt.formattype = FORMAT_VideoInfo; - amt.pbFormat = NULL; - amt.cbFormat = 0; break; case streamtypeAUDIO: amt.formattype = FORMAT_WaveFormatEx;