wmp: Fix memory leak in IWMP[Media|Playlist]::put_name.

Signed-off-by: Gijs Vermeulen <gijsvrm@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Gijs Vermeulen 2019-08-09 19:09:49 +02:00 committed by Alexandre Julliard
parent bfe12dc5dd
commit 8cacc16af8
1 changed files with 2 additions and 0 deletions

View File

@ -1819,6 +1819,7 @@ static HRESULT WINAPI WMPMedia_put_name(IWMPMedia *iface, BSTR name)
if (!name) return E_POINTER;
heap_free(This->name);
This->name = heap_strdupW(name);
return S_OK;
}
@ -2063,6 +2064,7 @@ static HRESULT WINAPI WMPPlaylist_put_name(IWMPPlaylist *iface, BSTR name)
if (!name) return E_POINTER;
heap_free(This->name);
This->name = heap_strdupW(name);
return S_OK;
}