We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents dd2d3f7 + 6a5ec1f commit fc8e558Copy full SHA for fc8e558
apache2/msc_xml.c
@@ -137,6 +137,13 @@ int xml_complete(modsec_rec *msr, char **error_msg) {
137
* Frees the resources used for XML parsing.
138
*/
139
apr_status_t xml_cleanup(modsec_rec *msr) {
140
+ if (msr->xml->parsing_ctx != NULL) {
141
+ if (msr->xml->parsing_ctx->myDoc) {
142
+ xmlFreeDoc(msr->xml->parsing_ctx->myDoc);
143
+ }
144
+ xmlFreeParserCtxt(msr->xml->parsing_ctx);
145
+ msr->xml->parsing_ctx = NULL;
146
147
if (msr->xml->doc != NULL) {
148
xmlFreeDoc(msr->xml->doc);
149
msr->xml->doc = NULL;
0 commit comments