Skip to content

Commit f65415a

Browse files
authored
Merge pull request #3191 from marcstern/v2/pr/mem_leak_re
Memory leaks + enhanced logging
2 parents fd0e042 + 046d3eb commit f65415a

File tree

2 files changed

+96
-143
lines changed

2 files changed

+96
-143
lines changed

apache2/msc_logging.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,7 +1475,8 @@ void sec_audit_logger_json(modsec_rec *msr) {
14751475
/* Unlock the mutex we used to serialise access to the audit log file. */
14761476
rc = apr_global_mutex_unlock(msr->modsecurity->auditlog_lock);
14771477
if (rc != APR_SUCCESS) {
1478-
msr_log(msr, 1, "Audit log: Failed to unlock global mutex: %s",
1478+
msr_log(msr, 1, "Audit log: Failed to unlock global mutex '%s': %s",
1479+
apr_global_mutex_lockfile(msr->modsecurity->auditlog_lock),
14791480
get_apr_error(msr->mp, rc));
14801481
}
14811482

@@ -2256,7 +2257,8 @@ void sec_audit_logger_native(modsec_rec *msr) {
22562257
/* Unlock the mutex we used to serialise access to the audit log file. */
22572258
rc = apr_global_mutex_unlock(msr->modsecurity->auditlog_lock);
22582259
if (rc != APR_SUCCESS) {
2259-
msr_log(msr, 1, "Audit log: Failed to unlock global mutex: %s",
2260+
msr_log(msr, 1, "Audit log: Failed to unlock global mutex '%s': %s",
2261+
apr_global_mutex_lockfile(msr->modsecurity->auditlog_lock),
22602262
get_apr_error(msr->mp, rc));
22612263
}
22622264

0 commit comments

Comments
 (0)