Fixes regarding memory management

Fixes assorted issues identified by valgrind.
This commit is contained in:
Felipe Zimmerle
2016-06-15 23:52:26 -03:00
parent cb91af537c
commit 9919026620
46 changed files with 234 additions and 73 deletions

View File

@@ -25,12 +25,12 @@ namespace modsecurity {
namespace operators {
bool IpMatch::init(const std::string &file, const char **error) {
bool IpMatch::init(const std::string &file, std::string *error) {
std::string e("");
bool res = m_tree.addFromBuffer(param, &e);
if (res == false) {
*error = e.c_str();
error->assign(e);
}
return res;