about summary refs log tree commit diff
path: root/src/libexpr
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/primops.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 2ab3eda53f43..0d4efc47e6d6 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -61,7 +61,7 @@ static void prim_import(EvalState & state, Value * * args, Value & v)
 
     if (isStorePath(path) && store->isValidPath(path) && isDerivation(path)) {
         Derivation drv = parseDerivation(readFile(path));
-        Value w;
+        Value & w = *state.allocValue();
         state.mkAttrs(w, 1 + drv.outputs.size());
         mkString(*state.allocAttr(w, state.sDrvPath), path, singleton<PathSet>("=" + path));
         state.mkList(*state.allocAttr(w, state.symbols.create("outputs")), drv.outputs.size());