diff --git a/dlls/msxml3/selection.c b/dlls/msxml3/selection.c index 55873bb2b2b..3cbf4e9c93a 100644 --- a/dlls/msxml3/selection.c +++ b/dlls/msxml3/selection.c @@ -513,7 +513,11 @@ static HRESULT WINAPI enumvariant_Next( /* we need to advance one step more for some reason */ if (ret_count) + { + node = NULL; IXMLDOMSelection_nextNode(This->selection, &node); + if (node) IXMLDOMNode_Release(node); + } return celt == 0 ? S_OK : S_FALSE; }