* xmlFreeElement: * @elem: An element * * Deallocate the memory used by an element definition */
| 1113 | * Deallocate the memory used by an element definition |
| 1114 | */ |
| 1115 | static void |
| 1116 | xmlFreeElement(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 | /** |
no test coverage detected