mshtml: Properly handle OOM errors in omnavigator.c (coverity).
This commit is contained in:
parent
4638fbf167
commit
3a4a4acd1a
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue