Merge pull request #3114 from airween/v3/sonarmemleakfix

fix: Sonarcloud memleak fixes
This commit is contained in:
Ervin Hegedus
2024-08-08 21:02:15 +02:00
committed by GitHub
2 changed files with 20 additions and 33 deletions

View File

@@ -480,9 +480,14 @@ int main(int argc, char **argv) {
ModSecurityTest<RegressionTest> test;
std::string ver(MODSECURITY_VERSION);
std::string envvar("MODSECURITY=ModSecurity " + ver + " regression tests");
std::string envvar("ModSecurity " + ver + " regression tests");
#ifndef WIN32
setenv("MODSECURITY", envvar.c_str(), 1);
#else
_putenv_s("MODSECURITY", envvar.c_str());
#endif
putenv(strdup(envvar.c_str()));
#ifndef NO_LOGS
int test_number = 0;
#endif