chunks example: Sets the freed variables to NULL

This commit is contained in:
Felipe Zimmerle 2017-06-19 19:08:26 -03:00
parent 6d77c76b27
commit 5a32b389b4
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277

View File

@ -103,12 +103,14 @@ int process_intervention(modsecurity::Transaction *transaction)
std::cout << "Log: " << intervention.log << std::endl;
free(intervention.log);
intervention.log = NULL;
if (intervention.url != NULL)
{
std::cout << "Intervention, redirect to: " << intervention.url;
std::cout << " with status code: " << intervention.status << std::endl;
free(intervention.url);
intervention.url = NULL;
return intervention.status;
}