From 76fef29cd3fc8283819b457882d5a5cf00a05255 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 11 Jan 2015 23:40:19 +0100 Subject: [PATCH] mshtml: Check for failed allocs (Coverity). --- dlls/mshtml/dispex.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index 7f6d5c59aa2..a97f09dab1f 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -345,9 +345,18 @@ static dispex_data_t *preprocess_dispex_data(DispatchEx *This) } data = heap_alloc(sizeof(dispex_data_t)); + if (!data) { + ERR("Out of memory\n"); + return NULL; + } data->func_cnt = 0; data->func_disp_cnt = 0; data->funcs = heap_alloc_zero(size*sizeof(func_info_t)); + if (!data->funcs) { + heap_free (data); + ERR("Out of memory\n"); + return NULL; + } list_add_tail(&dispex_data_list, &data->entry); while(*tid) {