Anton Romanov : wmp: Handle allocation failure in IWMPMedia_get_sourceURL.
Alexandre Julliard
julliard at winehq.org
Thu Mar 15 19:12:13 CDT 2018
Module: wine
Branch: master
Commit: bf7b21ec7b587215385c210e695cfa42e19efe4c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=bf7b21ec7b587215385c210e695cfa42e19efe4c
Author: Anton Romanov <theli.ua at gmail.com>
Date: Wed Mar 14 23:19:06 2018 -0700
wmp: Handle allocation failure in IWMPMedia_get_sourceURL.
Signed-off-by: Anton Romanov <theli.ua at gmail.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wmp/player.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/wmp/player.c b/dlls/wmp/player.c
index 6c68240..4a0d074 100644
--- a/dlls/wmp/player.c
+++ b/dlls/wmp/player.c
@@ -1577,9 +1577,14 @@ static HRESULT WINAPI WMPMedia_get_isIdentical(IWMPMedia *iface, IWMPMedia *othe
static HRESULT WINAPI WMPMedia_get_sourceURL(IWMPMedia *iface, BSTR *pbstrSourceUrl)
{
WMPMedia *This = impl_from_IWMPMedia(iface);
+ BSTR url;
TRACE("(%p)->(%p)\n", This, pbstrSourceUrl);
- *pbstrSourceUrl = SysAllocString(This->url);
- return S_OK;
+ url = SysAllocString(This->url);
+ if (url) {
+ *pbstrSourceUrl = url;
+ return S_OK;
+ }
+ return E_OUTOFMEMORY;
}
static HRESULT WINAPI WMPMedia_get_name(IWMPMedia *iface, BSTR *pbstrName)
More information about the wine-cvs
mailing list