diff --git a/src/libexpr/nixexpr.cc b/src/libexpr/nixexpr.cc index 34d286f4e..37e22c466 100644 --- a/src/libexpr/nixexpr.cc +++ b/src/libexpr/nixexpr.cc @@ -486,6 +486,12 @@ void ExprLambda::bindVars(EvalState & es, const std::shared_ptr void ExprCall::bindVars(EvalState & es, const std::shared_ptr & env) { + // Move storage into the Exprs arena + { + auto arena = es.mem.exprs.alloc; + std::pmr::vector newArgs{std::move(*args), arena}; + args.emplace(std::move(newArgs), arena); + } if (es.debugRepl) es.exprEnvs.insert(std::make_pair(this, env));