Marcus Meissner : mshtml: Check for failed allocs (Coverity).

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jan 14 14:35:43 CST 2015


Module: wine
Branch: master
Commit: 76fef29cd3fc8283819b457882d5a5cf00a05255
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=76fef29cd3fc8283819b457882d5a5cf00a05255

Author: Marcus Meissner <marcus at 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) {




More information about the wine-cvs mailing list