Commit 6e79aff6 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

mshtml: Handle realloc failure in add_func_info.

parent dc3189a7
......@@ -300,8 +300,12 @@ static void add_func_info(dispex_data_t *data, tid_t tid, const FUNCDESC *desc,
TRACE("adding %s...\n", debugstr_w(name));
if(info == data->funcs+data->func_cnt) {
if(data->func_cnt == data->func_size)
data->funcs = heap_realloc_zero(data->funcs, (data->func_size <<= 1)*sizeof(func_info_t));
if(data->func_cnt == data->func_size) {
info = heap_realloc_zero(data->funcs, (data->func_size <<= 1) * sizeof(func_info_t));
if(!info)
return;
data->funcs = info;
}
info = data->funcs+data->func_cnt;
data->func_cnt++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment