Module: wine Branch: master Commit: d907c8959c9b638962e387ab651bdc21b572aff3 URL: https://source.winehq.org/git/wine.git/?a=commit;h=d907c8959c9b638962e387ab6...
Author: Paul Gofman pgofman@codeweavers.com Date: Thu Feb 3 14:28:31 2022 +0300
hnetcfg: Don't use _GetValue() if text element is missing in get_xml_elements().
Signed-off-by: Paul Gofman pgofman@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/hnetcfg/port.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/hnetcfg/port.c b/dlls/hnetcfg/port.c index def77621764..611a652ce5e 100644 --- a/dlls/hnetcfg/port.c +++ b/dlls/hnetcfg/port.c @@ -265,7 +265,10 @@ static BOOL get_xml_elements( const char *desc_xml, struct xml_value_desc *value if (node_type == XmlNodeType_EndElement) value = L""; else goto done; } - if (FAILED(IXmlReader_GetValue( reader, &value, NULL ))) goto done; + else + { + if (FAILED(IXmlReader_GetValue( reader, &value, NULL ))) goto done; + } if (values[i].value) { WARN( "Duplicate value %s.\n", debugstr_w(values[i].name) );