Commit 0755a581 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

mshtml: Fix element leaks in get_elem_source_index.

parent ffb56bf7
......@@ -778,8 +778,8 @@ HRESULT get_elem_source_index(HTMLElement *elem, LONG *ret)
nsIDOMNode *parent_node, *iter;
UINT16 parent_type;
HTMLDOMNode *node;
int i;
nsresult nsres;
unsigned i, j;
HRESULT hres;
iter = elem->node.nsnode;
......@@ -830,7 +830,11 @@ HRESULT get_elem_source_index(HTMLElement *elem, LONG *ret)
break;
}
IHTMLDOMNode_Release(&node->IHTMLDOMNode_iface);
for(j = 0; j < buf.len; j++)
IHTMLDOMNode_Release(&buf.buf[j]->node.IHTMLDOMNode_iface);
free(buf.buf);
if(i == buf.len) {
FIXME("The element is not in parent's child list?\n");
return E_UNEXPECTED;
......
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