From f5b47a8077cde4582698333f57222617dcdff44d Mon Sep 17 00:00:00 2001 From: Felipe Zimmerle Date: Mon, 19 Jun 2017 18:32:17 -0300 Subject: [PATCH] Duplicates the url variable in the disruptive action The log message needs to be freed by the consumer. Doing the same with the url to keep the API consistent. --- src/transaction.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/transaction.cc b/src/transaction.cc index ddd90af6..7cddd1b2 100644 --- a/src/transaction.cc +++ b/src/transaction.cc @@ -1297,7 +1297,9 @@ int Transaction::processLogging() { */ bool Transaction::intervention(ModSecurityIntervention *it) { if (m_it.disruptive) { - it->url = m_it.url; + if (m_it.url) { + it->url = strdup(m_it.url); + } it->disruptive = m_it.disruptive; it->status = m_it.status;