MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCOLLADA / xmlFreePattern

Function xmlFreePattern

Externals/LibXML/pattern.c:227–257  ·  view source on GitHub ↗

* xmlFreePattern: * @comp: an XSLT comp * * Free up the memory allocated by @comp */

Source from the content-addressed store, hash-verified

225 * Free up the memory allocated by @comp
226 */
227void
228xmlFreePattern(xmlPatternPtr comp) {
229 xmlStepOpPtr op;
230 int i;
231
232 if (comp == NULL)
233 return;
234 if (comp->next != NULL)
235 xmlFreePattern(comp->next);
236 if (comp->stream != NULL)
237 xmlFreeStreamComp(comp->stream);
238 if (comp->pattern != NULL)
239 xmlFree((xmlChar *)comp->pattern);
240 if (comp->steps != NULL) {
241 if (comp->dict == NULL) {
242 for (i = 0;i < comp->nbStep;i++) {
243 op = &comp->steps[i];
244 if (op->value != NULL)
245 xmlFree((xmlChar *) op->value);
246 if (op->value2 != NULL)
247 xmlFree((xmlChar *) op->value2);
248 }
249 }
250 xmlFree(comp->steps);
251 }
252 if (comp->dict != NULL)
253 xmlDictFree(comp->dict);
254
255 memset(comp, -1, sizeof(xmlPattern));
256 xmlFree(comp);
257}
258
259/**
260 * xmlFreePatternList:

Callers 9

xmllint.cFile · 0.85
xmlXPathTryStreamCompileFunction · 0.85
xmlFreeTextReaderFunction · 0.85
xmlTextReaderSetupFunction · 0.85
xmlSchematronFreeRulesFunction · 0.85
xmlSchemaFreeIDCFunction · 0.85
xmlFreePatternListFunction · 0.85
xmlPatterncompileFunction · 0.85
patternTestFunction · 0.85

Calls 3

xmlFreeStreamCompFunction · 0.85
xmlDictFreeFunction · 0.85
memsetFunction · 0.85

Tested by 1

patternTestFunction · 0.68