for (xmlAttr *attr = child->properties; attr != NULL; attr = attr->next) {
if (strcmp(reinterpret_cast<const char *>(attr->ns->href), "http://template.sesse.net/") == 0 &&
strcmp(reinterpret_cast<const char *>(attr->name), "id") == 0) {
- id = reinterpret_cast<const char *>(xmlNodeGetContent(attr->children));
+ xmlChar *id_buf = xmlNodeGetContent(attr->children);
+ id = reinterpret_cast<const char *>(id_buf);
+ xmlFree(id_buf);
id_attr = attr;
}
}