mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Fix memory leak in modsecurity::utils::expandEnv()
Found by ASAN.
This commit is contained in:
parent
f888f4e5e4
commit
268f34bbcc
@ -126,9 +126,9 @@ std::list<std::string> expandEnv(const std::string& var, int flags) {
|
||||
std::ifstream *iss = new std::ifstream(exp[0], std::ios::in);
|
||||
if (iss->is_open()) {
|
||||
iss->close();
|
||||
delete iss;
|
||||
vars.push_back(exp[0]);
|
||||
}
|
||||
delete iss;
|
||||
}
|
||||
}
|
||||
wordfree(&p);
|
||||
|
Loading…
x
Reference in New Issue
Block a user