Commit e7c6cddd authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

mshtml: Fix memory leak on error path in add_func_info (Coverity).

parent a001c0a0
......@@ -302,8 +302,10 @@ static void add_func_info(dispex_data_t *data, tid_t tid, const FUNCDESC *desc,
if(info == data->funcs+data->func_cnt) {
if(data->func_cnt == data->func_size) {
info = realloc(data->funcs, data->func_size * 2 * sizeof(func_info_t));
if(!info)
if(!info) {
SysFreeString(name);
return;
}
memset(info + data->func_size, 0, data->func_size * sizeof(func_info_t));
data->funcs = info;
data->func_size *= 2;
......
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