mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Deletes driver in case of parser failure
This avoids memory leaks.
This commit is contained in:
committed by
Felipe Zimmerle
parent
808fd23358
commit
9a1faab668
@@ -103,6 +103,7 @@ int Rules::loadFromUri(const char *uri) {
|
|||||||
|
|
||||||
if (driver->parseFile(uri) == false) {
|
if (driver->parseFile(uri) == false) {
|
||||||
m_parserError << driver->m_parserError.str();
|
m_parserError << driver->m_parserError.str();
|
||||||
|
delete driver;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user