Fixed assert() usage:

- added some missing
 - removed some invalid
 - removed some that were not relevant in the context of the current function, when done in a called function
This commit is contained in:
Marc Stern
2024-07-31 11:17:36 +02:00
parent 28b6e1d7d0
commit 7c379c8d59
12 changed files with 552 additions and 144 deletions

View File

@@ -140,6 +140,8 @@ int xml_complete(modsec_rec *msr, char **error_msg) {
* Frees the resources used for XML parsing.
*/
apr_status_t xml_cleanup(modsec_rec *msr) {
assert(msr != NULL);
assert(msr->xml != NULL);
if (msr->xml->parsing_ctx != NULL) {
if (msr->xml->parsing_ctx->myDoc) {
xmlFreeDoc(msr->xml->parsing_ctx->myDoc);