mshtml: Handle allocation failure during collection creation (Coverity).

This commit is contained in:
Nikolay Sivov 2015-06-03 14:36:02 +03:00 committed by Alexandre Julliard
parent 233c8c163b
commit a260d3efc6
1 changed files with 3 additions and 0 deletions

View File

@ -824,6 +824,9 @@ static IHTMLElementCollection *HTMLElementCollection_Create(HTMLElement **elems,
{
HTMLElementCollection *ret = heap_alloc_zero(sizeof(HTMLElementCollection));
if (!ret)
return NULL;
ret->IHTMLElementCollection_iface.lpVtbl = &HTMLElementCollectionVtbl;
ret->ref = 1;
ret->elems = elems;