From 4b6e362359559f0f06866749674829a205521aa1 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 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/quartz/avisplit.c b/dlls/quartz/avisplit.c index 89c02d4..a619dcf 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; -- 1.5.4.1