quartz: Fix memory leaks on error paths in FilterMapper3_RegisterFilter (cppcheck).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
531297a8b4
commit
8e081d32bd
|
@ -894,12 +894,16 @@ static HRESULT WINAPI FilterMapper3_RegisterFilter(IFilterMapper3 *iface,
|
||||||
|
|
||||||
if (FAILED(hr = CoCreateInstance(&CLSID_CDeviceMoniker, NULL, CLSCTX_INPROC,
|
if (FAILED(hr = CoCreateInstance(&CLSID_CDeviceMoniker, NULL, CLSCTX_INPROC,
|
||||||
&IID_IParseDisplayName, (void **)&parser)))
|
&IID_IParseDisplayName, (void **)&parser)))
|
||||||
|
{
|
||||||
|
free(display_name);
|
||||||
return hr;
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
if (FAILED(hr = IParseDisplayName_ParseDisplayName(parser, NULL, display_name, &eaten, &moniker)))
|
if (FAILED(hr = IParseDisplayName_ParseDisplayName(parser, NULL, display_name, &eaten, &moniker)))
|
||||||
{
|
{
|
||||||
ERR("Failed to parse display name, hr %#x.\n", hr);
|
ERR("Failed to parse display name, hr %#x.\n", hr);
|
||||||
IParseDisplayName_Release(parser);
|
IParseDisplayName_Release(parser);
|
||||||
|
free(display_name);
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -909,6 +913,7 @@ static HRESULT WINAPI FilterMapper3_RegisterFilter(IFilterMapper3 *iface,
|
||||||
{
|
{
|
||||||
ERR("Failed to get property bag, hr %#x.\n", hr);
|
ERR("Failed to get property bag, hr %#x.\n", hr);
|
||||||
IMoniker_Release(moniker);
|
IMoniker_Release(moniker);
|
||||||
|
free(display_name);
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue