]> granicus.if.org Git - icinga2/commitdiff
Fix crash when using include_recursive in an object definition
authorGunnar Beutner <gunnar.beutner@netways.de>
Wed, 22 Jun 2016 15:01:36 +0000 (17:01 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Wed, 22 Jun 2016 15:01:36 +0000 (17:01 +0200)
fixes #12022

lib/config/configcompiler.cpp

index 6eb826ff4b4d22e56e10d2847354a2749a25bf33..7e76e9883c772faa0326e0625a8cae225c275073 100644 (file)
@@ -180,7 +180,10 @@ Expression *ConfigCompiler::HandleIncludeRecursive(const String& relativeBase, c
 
        std::vector<Expression *> expressions;
        Utility::GlobRecursive(ppath, pattern, boost::bind(&ConfigCompiler::CollectIncludes, boost::ref(expressions), _1, zone, package), GlobFile);
-       return new DictExpression(expressions);
+
+       DictExpression *dict = new DictExpression(expressions);
+       dict->MakeInline();
+       return dict;
 }
 
 void ConfigCompiler::HandleIncludeZone(const String& relativeBase, const String& tag, const String& path, const String& pattern, const String& package, std::vector<Expression *>& expressions)