forked from Mirrors/wine-wine
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
parent
bfe12dc5dd
commit
8cacc16af8
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue