MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlFreeElement

Function xmlFreeElement

ThirdParty/libxml2/vtklibxml2/valid.c:1115–1129  ·  view source on GitHub ↗

* xmlFreeElement: * @elem: An element * * Deallocate the memory used by an element definition */

Source from the content-addressed store, hash-verified

1113 * Deallocate the memory used by an element definition
1114 */
1115static void
1116xmlFreeElement(xmlElementPtr elem) {
1117 if (elem == NULL) return;
1118 xmlUnlinkNode((xmlNodePtr) elem);
1119 xmlFreeDocElementContent(elem->doc, elem->content);
1120 if (elem->name != NULL)
1121 xmlFree((xmlChar *) elem->name);
1122 if (elem->prefix != NULL)
1123 xmlFree((xmlChar *) elem->prefix);
1124#ifdef LIBXML_REGEXP_ENABLED
1125 if (elem->contModel != NULL)
1126 xmlRegFreeRegexp(elem->contModel);
1127#endif
1128 xmlFree(elem);
1129}
1130
1131
1132/**

Callers 4

xmlAddElementDeclFunction · 0.85
xmlFreeElementTableEntryFunction · 0.85
xmlCopyElementFunction · 0.85
xmlGetDtdElementDesc2Function · 0.85

Calls 3

xmlUnlinkNodeFunction · 0.85
xmlFreeDocElementContentFunction · 0.85
xmlRegFreeRegexpFunction · 0.85

Tested by

no test coverage detected