mfplay: Fix a leak on error path in synchronous CreateMediaItemFromURL() (Coverity).

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2021-04-13 09:03:33 +03:00 committed by Alexandre Julliard
parent e2f74ce448
commit 5512eceada
1 changed files with 5 additions and 0 deletions

View File

@ -835,7 +835,12 @@ static HRESULT media_player_create_item_from_url(struct media_player *player,
}
if (SUCCEEDED(hr))
{
*ret = &item->IMFPMediaItem_iface;
IMFPMediaItem_AddRef(*ret);
}
IMFPMediaItem_Release(&item->IMFPMediaItem_iface);
return hr;
}