dmband: Fix a memory leak.

This commit is contained in:
Andrew Talbot 2007-09-18 22:58:29 +01:00 committed by Alexandre Julliard
parent 77fe86620c
commit 8086079b2f
1 changed files with 2 additions and 0 deletions

View File

@ -463,6 +463,8 @@ static HRESULT IDirectMusicBandImpl_IPersistStream_ParseInstrument (LPPERSISTSTR
hr = IDirectMusicObject_QueryInterface (pObject, &IID_IDirectMusicCollection, (void**) &pCol); hr = IDirectMusicObject_QueryInterface (pObject, &IID_IDirectMusicCollection, (void**) &pCol);
if (FAILED(hr)) { if (FAILED(hr)) {
ERR(": failed to get IDirectMusicCollection Interface from DMObject\n"); ERR(": failed to get IDirectMusicCollection Interface from DMObject\n");
HeapFree(GetProcessHeap(), 0, pNewInstrument);
return hr; return hr;
} }
pNewInstrument->ppReferenceCollection = pCol; pNewInstrument->ppReferenceCollection = pCol;