* xmlXPathNodeSetFreeNs: * @ns: the XPath namespace node found in a nodeset. * * Namespace nodes in libxml don't match the XPath semantic. In a node set * the namespace nodes are duplicated and the next pointer is set to the * parent node in the XPath semantic. Check if such a node needs to be freed */
| 2744 | * parent node in the XPath semantic. Check if such a node needs to be freed |
| 2745 | */ |
| 2746 | void |
| 2747 | xmlXPathNodeSetFreeNs(xmlNsPtr ns) { |
| 2748 | if ((ns == NULL) || (ns->type != XML_NAMESPACE_DECL)) |
| 2749 | return; |
| 2750 | |
| 2751 | if ((ns->next != NULL) && (ns->next->type != XML_NAMESPACE_DECL)) { |
| 2752 | if (ns->href != NULL) |
| 2753 | xmlFree((xmlChar *)ns->href); |
| 2754 | if (ns->prefix != NULL) |
| 2755 | xmlFree((xmlChar *)ns->prefix); |
| 2756 | xmlFree(ns); |
| 2757 | } |
| 2758 | } |
| 2759 | |
| 2760 | /** |
| 2761 | * xmlXPathNodeSetCreate: |
no outgoing calls
no test coverage detected