]> granicus.if.org Git - icinga2/commitdiff
Fix scoping rules for dictionaries.
authorGunnar Beutner <gunnar@beutner.name>
Sat, 10 May 2014 10:43:16 +0000 (12:43 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Sat, 10 May 2014 10:43:16 +0000 (12:43 +0200)
Refs #6183

lib/config/aexpression.cpp

index be027f9565eac62b04046ba12f15e476f7862688..77aeefe4d51b85dc35a2f24a072257846dfe46b8 100644 (file)
@@ -308,9 +308,9 @@ Value AExpression::OpDict(const AExpression *expr, const Dictionary::Ptr& locals
                }
        }
 
-       result->Remove("__parent");
-
-       return result;
+       Dictionary::Ptr xresult = result->ShallowClone();
+       xresult->Remove("__parent");
+       return xresult;
 }
 
 Value AExpression::OpSet(const AExpression *expr, const Dictionary::Ptr& locals)