mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
chunks example: Sets the freed variables to NULL
This commit is contained in:
parent
6d77c76b27
commit
5a32b389b4
@ -103,12 +103,14 @@ int process_intervention(modsecurity::Transaction *transaction)
|
|||||||
|
|
||||||
std::cout << "Log: " << intervention.log << std::endl;
|
std::cout << "Log: " << intervention.log << std::endl;
|
||||||
free(intervention.log);
|
free(intervention.log);
|
||||||
|
intervention.log = NULL;
|
||||||
|
|
||||||
if (intervention.url != NULL)
|
if (intervention.url != NULL)
|
||||||
{
|
{
|
||||||
std::cout << "Intervention, redirect to: " << intervention.url;
|
std::cout << "Intervention, redirect to: " << intervention.url;
|
||||||
std::cout << " with status code: " << intervention.status << std::endl;
|
std::cout << " with status code: " << intervention.status << std::endl;
|
||||||
free(intervention.url);
|
free(intervention.url);
|
||||||
|
intervention.url = NULL;
|
||||||
return intervention.status;
|
return intervention.status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user