From 84aeb74377ce41408680256813870271999e8208 Mon Sep 17 00:00:00 2001 From: Ben Burdette Date: Wed, 5 Jan 2022 14:25:45 -0700 Subject: [PATCH] revert value-add --- src/libcmd/repl.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcmd/repl.cc b/src/libcmd/repl.cc index 4ecbf51b5..57463bd79 100644 --- a/src/libcmd/repl.cc +++ b/src/libcmd/repl.cc @@ -641,9 +641,9 @@ bool NixRepl::processLine(string line) isVarName(name = removeWhitespace(string(line, 0, p)))) { Expr * e = parseString(string(line, p + 1)); - Value *v = new Value(*state->allocValue()); - v->mkThunk(env, e); - addVarToScope(state->symbols.create(name), *v); + Value & v(*state->allocValue()); + v.mkThunk(env, e); + addVarToScope(state->symbols.create(name), v); } else { Value v; evalString(line, v);