regression: avoids memcheck complains

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

View File

@ -434,8 +434,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
@ -565,5 +566,6 @@ int main(int argc, char **argv) {
} }
#endif #endif
free(eenvvar);
return 0; return 0;
} }