aboutsummaryrefslogtreecommitdiffstats
path: root/ucs2-interface/ucs-xml/UcsXml.c
diff options
context:
space:
mode:
Diffstat (limited to 'ucs2-interface/ucs-xml/UcsXml.c')
-rw-r--r--ucs2-interface/ucs-xml/UcsXml.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ucs2-interface/ucs-xml/UcsXml.c b/ucs2-interface/ucs-xml/UcsXml.c
index 96498ef..f953fe3 100644
--- a/ucs2-interface/ucs-xml/UcsXml.c
+++ b/ucs2-interface/ucs-xml/UcsXml.c
@@ -266,7 +266,7 @@ static ParseResult_t ParseRoutes(UcsXmlVal_t *ucs, PrivateData_t *priv);
UcsXmlVal_t *UcsXml_Parse(const char *xmlString)
{
- UcsXmlVal_t *val;
+ UcsXmlVal_t *val = NULL;
ParseResult_t result = Parse_MemoryError;
mxml_node_t *tree;
if (!(tree = mxmlLoadString(NULL, xmlString, MXML_NO_CALLBACK))) goto ERROR;
@@ -287,7 +287,8 @@ ERROR:
assert(false);
if (!tree)
mxmlDelete(tree);
- FreeVal(val);
+ if (val)
+ FreeVal(val);
return NULL;
}