Commit 3a4a4acd authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Properly handle OOM errors in omnavigator.c (coverity).

parent 4638fbf1
......@@ -803,7 +803,7 @@ static HRESULT WINAPI HTMLWindow2_get_navigator(IHTMLWindow2 *iface, IOmNavigato
TRACE("(%p)->(%p)\n", This, p);
*p = OmNavigator_Create();
return S_OK;
return *p ? S_OK : E_OUTOFMEMORY;
}
static HRESULT WINAPI HTMLWindow2_put_name(IHTMLWindow2 *iface, BSTR v)
......
......@@ -941,6 +941,9 @@ IOmNavigator *OmNavigator_Create(void)
OmNavigator *ret;
ret = heap_alloc_zero(sizeof(*ret));
if(!ret)
return NULL;
ret->IOmNavigator_iface.lpVtbl = &OmNavigatorVtbl;
ret->ref = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment