fix memory leak

This commit is contained in:
c0ntrol
2018-09-15 21:09:10 +02:00
parent 5e2a096c7c
commit ca7b0e6c78

View File

@@ -75,6 +75,7 @@ void get_xml_str_n( xmlDocPtr doc, xmlNodePtr node, char *val, size_t len )
xmlChar *xmlTemp = xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
char *chTemp = UTF8toLAT1(xmlTemp);
strncpy( val, chTemp, len );
free(chTemp);
}
float get_xml_float( xmlDocPtr doc, xmlNodePtr node )