d3drm: Release the child object after we're done with it in load_data() (Valgrind).

This commit is contained in:
Henri Verbeet 2015-04-30 16:46:40 +02:00 committed by Alexandre Julliard
parent bef432a19c
commit 90239052ab
1 changed files with 7 additions and 10 deletions

View File

@ -1173,32 +1173,29 @@ static HRESULT load_data(IDirect3DRM3 *iface, IDirectXFileData *data_object, IID
IDirectXFileDataReference *reference;
IDirectXFileBinary *binary;
hr = IDirectXFileObject_QueryInterface(child, &IID_IDirectXFileBinary, (void **)&binary);
if (SUCCEEDED(hr))
if (SUCCEEDED(IDirectXFileObject_QueryInterface(child,
&IID_IDirectXFileBinary, (void **)&binary)))
{
FIXME("Binary Object not supported yet\n");
IDirectXFileBinary_Release(binary);
continue;
}
hr = IDirectXFileObject_QueryInterface(child, &IID_IDirectXFileData, (void **)&data);
if (SUCCEEDED(hr))
else if (SUCCEEDED(IDirectXFileObject_QueryInterface(child,
&IID_IDirectXFileData, (void **)&data)))
{
TRACE("Found Data Object\n");
hr = load_data(iface, data, GUIDs, nb_GUIDs, LoadProc, ArgLP, LoadTextureProc, ArgLTP, frame);
IDirectXFileData_Release(data);
continue;
}
hr = IDirectXFileObject_QueryInterface(child, &IID_IDirectXFileDataReference, (void **)&reference);
if (SUCCEEDED(hr))
else if (SUCCEEDED(IDirectXFileObject_QueryInterface(child,
&IID_IDirectXFileDataReference, (void **)&reference)))
{
TRACE("Found Data Object Reference\n");
IDirectXFileDataReference_Resolve(reference, &data);
hr = load_data(iface, data, GUIDs, nb_GUIDs, LoadProc, ArgLP, LoadTextureProc, ArgLTP, frame);
IDirectXFileData_Release(data);
IDirectXFileDataReference_Release(reference);
continue;
}
IDirectXFileObject_Release(child);
}
if (hr != DXFILEERR_NOMOREOBJECTS)