d3drm: Fix leakage of pData2 on error.

This commit is contained in:
Christian Costa 2012-03-09 11:55:37 +01:00 committed by Alexandre Julliard
parent ccb38b2d9f
commit fe339ba25b
1 changed files with 3 additions and 3 deletions
dlls/d3drm

View File

@ -1159,10 +1159,7 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_Load(IDirect3DRMMeshBuilder3*
hr = IDirectXFileData_GetType(pData2, &pGuid);
if (hr != DXFILE_OK)
{
IDirectXFileData_Release(pData2);
goto end;
}
TRACE("Found object type whose GUID = %s\n", debugstr_guid(pGuid));
@ -1206,11 +1203,14 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_Load(IDirect3DRMMeshBuilder3*
}
IDirectXFileData_Release(pData2);
pData2 = NULL;
}
ret = D3DRM_OK;
end:
if (pData2)
IDirectXFileData_Release(pData2);
if (pData)
IDirectXFileData_Release(pData);
if (pEnumObject)