]> granicus.if.org Git - icinga2/commitdiff
Fix minor memory leak in the config parser
authorGunnar Beutner <gunnar.beutner@netways.de>
Sat, 6 Dec 2014 09:23:25 +0000 (10:23 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Sat, 6 Dec 2014 09:23:25 +0000 (10:23 +0100)
lib/config/expression.hpp

index d89a5f3e51605aafa9b3b816b4cffa57441704cc..17ad784ad0c5d6821d34b30826ff73ef2e53737b 100644 (file)
@@ -646,6 +646,12 @@ public:
                : DebuggableExpression(debugInfo), m_Indexer(indexer)
        { }
 
+       ~IndexerExpression(void)
+       {
+               BOOST_FOREACH(Expression *expr, m_Indexer)
+                       delete expr;
+       }
+
 protected:
        virtual Value DoEvaluate(VMFrame& frame, DebugHint *dhint) const;