Jacek Caban : mshtml: Fixed ref count in parentElement.

Alexandre Julliard julliard at winehq.org
Thu Sep 13 07:17:23 CDT 2007


Module: wine
Branch: master
Commit: c1057b43a2c1704c72cfcd3c381ccefc28b709fc
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c1057b43a2c1704c72cfcd3c381ccefc28b709fc

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Sep 12 23:33:59 2007 +0200

mshtml: Fixed ref count in parentElement.

---

 dlls/mshtml/txtrange.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/dlls/mshtml/txtrange.c b/dlls/mshtml/txtrange.c
index fdbaf9d..7c7dad8 100644
--- a/dlls/mshtml/txtrange.c
+++ b/dlls/mshtml/txtrange.c
@@ -818,7 +818,6 @@ static HRESULT WINAPI HTMLTxtRange_parentElement(IHTMLTxtRange *iface, IHTMLElem
     HTMLTxtRange *This = HTMLTXTRANGE_THIS(iface);
     nsIDOMNode *nsnode, *tmp;
     HTMLDOMNode *node;
-    HRESULT hres;
 
     TRACE("(%p)->(%p)\n", This, parent);
 
@@ -837,10 +836,7 @@ static HRESULT WINAPI HTMLTxtRange_parentElement(IHTMLTxtRange *iface, IHTMLElem
     node = get_node(This->doc, nsnode);
     nsIDOMNode_Release(nsnode);
 
-    hres = IHTMLDOMNode_QueryInterface(HTMLDOMNODE(node), &IID_IHTMLElement, (void**)parent);
-
-    IHTMLDOMNode_Release(HTMLDOMNODE(node));
-    return hres;
+    return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(node), &IID_IHTMLElement, (void**)parent);
 }
 
 static HRESULT WINAPI HTMLTxtRange_duplicate(IHTMLTxtRange *iface, IHTMLTxtRange **Duplicate)




More information about the wine-cvs mailing list