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

@@ -15,6 +15,8 @@
#include "operators/ip_match_from_file.h"
#include <string.h>
#include <string>
#include "operators/operator.h"
@@ -24,7 +26,7 @@ namespace operators {
bool IpMatchFromFile::init(const std::string &file,
const char **error) {
std::string *error) {
std::string e("");
bool res = false;
@@ -35,7 +37,7 @@ bool IpMatchFromFile::init(const std::string &file,
}
if (res == false) {
*error = e.c_str();
error->assign(e);
}
return res;