quartz/tests: Fix potential NULL dereference (Coverity).

This commit is contained in:
Alexander Dorofeyev 2008-09-09 20:34:59 +03:00 committed by Alexandre Julliard
parent 67684c4850
commit 48865c9064
1 changed files with 5 additions and 2 deletions

View File

@ -1122,9 +1122,12 @@ static HRESULT TestFilter_Create(const CLSID* pClsid, const TestFilterPinData *p
error:
for (i = 0; i < nPins; i++)
if (pTestFilter->ppPins)
{
if (pTestFilter->ppPins[i]) IPin_Release(pTestFilter->ppPins[i]);
for (i = 0; i < nPins; i++)
{
if (pTestFilter->ppPins[i]) IPin_Release(pTestFilter->ppPins[i]);
}
}
CoTaskMemFree(pTestFilter->ppPins);
DeleteCriticalSection(&pTestFilter->csFilter);