mshtml: Fixed use after free in HTMLElement_destructor.

This commit is contained in:
Jacek Caban 2011-03-02 23:10:22 +01:00 committed by Alexandre Julliard
parent eaa6a9fdcf
commit 873619e9bd
1 changed files with 4 additions and 1 deletions

View File

@ -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);
}