regression: avoids memcheck complains

This commit is contained in:
Felipe Zimmerle 2018-12-05 10:32:26 -03:00 committed by Felipe Zimmerle
parent 248cce8aff
commit 06aa4e1cdd
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277

View File

@ -426,8 +426,9 @@ int main(int argc, char **argv) {
std::string ver(MODSECURITY_VERSION); std::string ver(MODSECURITY_VERSION);
std::string envvar("MODSECURITY=ModSecurity " + ver + " regression tests"); std::string envvar("MODSECURITY=ModSecurity " + ver + " regression tests");
char *eenvvar = strdup(envvar.c_str());
putenv(strdup(envvar.c_str())); putenv(eenvvar);
#ifndef NO_LOGS #ifndef NO_LOGS
int test_number = 0; int test_number = 0;
#endif #endif
@ -557,5 +558,6 @@ int main(int argc, char **argv) {
} }
#endif #endif
free(eenvvar);
return 0; return 0;
} }