static void xsltp_keys_cache_free_keys(xsltp_keys_t *xsltp_keys, int type) { if (type & XSLT_KEYS_LIST_FREE_KEYS) { if (xsltp_keys->xslt_document != NULL) { xsltp_log_debug1("free document keys %p", xsltp_keys->xslt_document); xsltFreeDocumentKeys(xsltp_keys->xslt_document); } if (xsltp_keys->xslt_document_not_computed_keys != NULL) { xsltp_log_debug1("free document keys (wo computed) %p", xsltp_keys->xslt_document_not_computed_keys); xsltFreeDocumentKeys(xsltp_keys->xslt_document_not_computed_keys); } } if (type & XSLT_KEYS_LIST_FREE_DATA) { if (xsltp_keys->xslt_document != NULL) { xsltp_free(xsltp_keys->xslt_document); } if (xsltp_keys->xslt_document_not_computed_keys != NULL) { xsltp_free(xsltp_keys->xslt_document_not_computed_keys); } xsltp_free(xsltp_keys->stylesheet_uri); xsltp_free(xsltp_keys->document_uri); } xsltp_free(xsltp_keys); }
/** * xsltFreeStyleDocuments: * @style: an XSLT style sheet * * Free up all the space used by the loaded documents */ void xsltFreeStyleDocuments(xsltStylesheetPtr style) { xsltDocumentPtr doc, cur; cur = style->docList; while (cur != NULL) { doc = cur; cur = cur->next; xsltFreeDocumentKeys(doc); if (!doc->main) xmlFreeDoc(doc->doc); xmlFree(doc); } }
void ngx_http_xsltproc_xslt_keys_free(ngx_http_xsltproc_xslt_keys_t *xslt_keys, int type) { if (type & XSLT_KEYS_LIST_FREE_KEYS) xsltFreeDocumentKeys(xslt_keys->xslt_document); if (type & XSLT_KEYS_LIST_FREE_DATA) { ngx_http_xsltproc_free(xslt_keys->xslt_document); ngx_http_xsltproc_free(xslt_keys->stylesheet_uri); ngx_http_xsltproc_free(xslt_keys->document_uri); } ngx_http_xsltproc_free(xslt_keys); }
/** * xsltFreeDocuments: * @ctxt: an XSLT transformation context * * Free up all the space used by the loaded documents */ void xsltFreeDocuments(xsltTransformContextPtr ctxt) { xsltDocumentPtr doc, cur; cur = ctxt->docList; while (cur != NULL) { doc = cur; cur = cur->next; xsltFreeDocumentKeys(doc); if (!doc->main) xmlFreeDoc(doc->doc); xmlFree(doc); } }