mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
Merge pull request #2760 from martinhsv/v2/master
XML parser cleanup: NULL duplicate pointer
This commit is contained in:
commit
4136c4c46b
@ -140,6 +140,9 @@ apr_status_t xml_cleanup(modsec_rec *msr) {
|
||||
if (msr->xml->parsing_ctx != NULL) {
|
||||
if (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);
|
||||
msr->xml->parsing_ctx = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user