Commit 873619e9 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Fixed use after free in HTMLElement_destructor.

parent eaa6a9fd
......@@ -1649,7 +1649,10 @@ void HTMLElement_destructor(HTMLDOMNode *iface)
HTMLElement *This = impl_from_HTMLDOMNode(iface);
HTMLDOMAttribute *attr;
LIST_FOR_EACH_ENTRY(attr, &This->attrs, HTMLDOMAttribute, entry) {
while(!list_empty(&This->attrs)) {
attr = LIST_ENTRY(list_head(&This->attrs), HTMLDOMAttribute, entry);
list_remove(&attr->entry);
attr->elem = NULL;
IHTMLDOMAttribute_Release(&attr->IHTMLDOMAttribute_iface);
}
......
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