dmband: Fix a memory leak.
This commit is contained in:
parent
77fe86620c
commit
8086079b2f
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue