wsdapi: Ensure text node parent is NULL before calling WSDXMLAddChild.

Signed-off-by: Owen Rudge <orudge@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Owen Rudge 2018-04-17 23:04:26 +01:00 committed by Alexandre Julliard
parent 7fdf90e395
commit 3cd8986e93
1 changed files with 1 additions and 0 deletions

View File

@ -512,6 +512,7 @@ static HRESULT duplicate_element(WSDXML_ELEMENT *parent, const WSDXML_ELEMENT *n
text_node = WSDAllocateLinkedMemory(new_element, sizeof(WSDXML_TEXT));
if (text_node == NULL) goto failed;
text_node->Node.Parent = NULL;
text_node->Node.Next = NULL;
text_node->Node.Type = TextType;
text_node->Text = duplicate_string(text_node, ((WSDXML_TEXT *)cur_node)->Text);