>From 9d1fde62c1ccb184992bdb1a6e05354ca322b347 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov@codeweavers.com>
Date: Mon, 23 Jan 2012 17:36:35 +0300
Subject: [PATCH 7/7] Allocate private data when cloning from existing document

---
 dlls/msxml3/domdoc.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c
index 72f9a31..517b581 100644
--- a/dlls/msxml3/domdoc.c
+++ b/dlls/msxml3/domdoc.c
@@ -2082,7 +2082,9 @@ static HRESULT WINAPI domdoc_load(
             if(pNewDoc)
             {
                 domdoc *newDoc = impl_from_IXMLDOMDocument3( pNewDoc );
+
                 xmldoc = xmlCopyDoc(get_doc(newDoc), 1);
+                xmldoc->_private = create_priv();
                 hr = attach_xmldoc(This, xmldoc);
 
                 if(SUCCEEDED(hr))
@@ -3444,8 +3446,7 @@ HRESULT DOMDocument_create(MSXML_VERSION version, IUnknown *pUnkOuter, void **pp
     if(!xmldoc)
         return E_OUTOFMEMORY;
 
-    xmldoc->_private = create_priv();
-    priv_from_xmlDocPtr(xmldoc)->properties = create_properties(version);
+    xmldoc_init(xmldoc, version);
 
     hr = get_domdoc_from_xmldoc(xmldoc, (IXMLDOMDocument3**)ppObj);
     if(FAILED(hr))
-- 
1.5.6.5

