Commit 5e1d854e authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

d3drm: Fix child leak.

parent ff0e8250
......@@ -1260,6 +1260,7 @@ HRESULT load_mesh_data(IDirect3DRMMeshBuilder3* iface, LPDIRECTXFILEDATA pData)
if (FAILED(hr))
{
hr = IDirectXFileObject_QueryInterface(child, &IID_IDirectXFileDataReference, (void **)&reference);
IDirectXFileObject_Release(child);
if (FAILED(hr))
goto end;
......@@ -1268,6 +1269,10 @@ HRESULT load_mesh_data(IDirect3DRMMeshBuilder3* iface, LPDIRECTXFILEDATA pData)
if (FAILED(hr))
goto end;
}
else
{
IDirectXFileObject_Release(child);
}
hr = Direct3DRMMaterial_create(&material);
if (FAILED(hr))
......@@ -1357,9 +1362,14 @@ HRESULT load_mesh_data(IDirect3DRMMeshBuilder3* iface, LPDIRECTXFILEDATA pData)
i++;
}
if (hr == S_OK)
{
IDirectXFileObject_Release(child);
WARN("Found more sub-objects than expected\n");
}
else if (hr != DXFILEERR_NOMOREOBJECTS)
{
goto end;
}
hr = S_OK;
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment