wmp: Fix some memory leaks on error path (Coverity).

Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sven Baars 2019-08-17 18:50:17 +02:00 committed by Alexandre Julliard
parent 9e8cf8082c
commit 2a88c53a9f
1 changed files with 2 additions and 0 deletions

View File

@ -2300,6 +2300,7 @@ HRESULT create_media_from_url(BSTR url, double duration, IWMPMedia **ppMedia)
if (FAILED(hr))
{
heap_free(name_dup);
IWMPMedia_Release(&media->IWMPMedia_iface);
return hr;
}
hr = IUri_GetPath(uri, &path);
@ -2307,6 +2308,7 @@ HRESULT create_media_from_url(BSTR url, double duration, IWMPMedia **ppMedia)
{
heap_free(name_dup);
IUri_Release(uri);
IWMPMedia_Release(&media->IWMPMedia_iface);
return hr;
}