Module: wine Branch: master Commit: a260d3efc625e763c12986cc101a113ca1e4bd73 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a260d3efc625e763c12986cc10...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Wed Jun 3 14:36:02 2015 +0300
mshtml: Handle allocation failure during collection creation (Coverity).
---
dlls/mshtml/htmlelemcol.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/mshtml/htmlelemcol.c b/dlls/mshtml/htmlelemcol.c index a57f39e..c6c65b1 100644 --- a/dlls/mshtml/htmlelemcol.c +++ b/dlls/mshtml/htmlelemcol.c @@ -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;