mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-16 16:06:12 +03:00
XML parser cleanup: NULL duplicate pointer
This commit is contained in:
parent
fc8e5586e7
commit
dfbdaf8f31
@ -140,6 +140,9 @@ apr_status_t xml_cleanup(modsec_rec *msr) {
|
|||||||
if (msr->xml->parsing_ctx != NULL) {
|
if (msr->xml->parsing_ctx != NULL) {
|
||||||
if (msr->xml->parsing_ctx->myDoc) {
|
if (msr->xml->parsing_ctx->myDoc) {
|
||||||
xmlFreeDoc(msr->xml->parsing_ctx->myDoc);
|
xmlFreeDoc(msr->xml->parsing_ctx->myDoc);
|
||||||
|
if (msr->xml->parsing_ctx->myDoc == msr->xml->doc) {
|
||||||
|
msr->xml->doc = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
xmlFreeParserCtxt(msr->xml->parsing_ctx);
|
xmlFreeParserCtxt(msr->xml->parsing_ctx);
|
||||||
msr->xml->parsing_ctx = NULL;
|
msr->xml->parsing_ctx = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user