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

@@ -69,7 +69,7 @@ int VerifyCC::luhnVerify(const char *ccnumber, int len) {
bool VerifyCC::init(const std::string &param2, const char **error) {
bool VerifyCC::init(const std::string &param2, std::string *error) {
const char *errptr = NULL;
int erroffset = 0;
@@ -78,7 +78,7 @@ bool VerifyCC::init(const std::string &param2, const char **error) {
m_pce = pcre_study(m_pc, PCRE_STUDY_JIT_COMPILE, &errptr);
if ((m_pc == NULL) || (m_pce == NULL)) {
*error = errptr;
error->assign(errptr);
return false;
}