Module: wine Branch: master Commit: 76fef29cd3fc8283819b457882d5a5cf00a05255 URL: http://source.winehq.org/git/wine.git/?a=commit;h=76fef29cd3fc8283819b457882...
Author: Marcus Meissner marcus@jet.franken.de Date: Sun Jan 11 23:40:19 2015 +0100
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 7f6d5c5..a97f09d 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) {