about summary refs log tree commit diff
path: root/third_party
diff options
context:
space:
mode:
Diffstat (limited to 'third_party')
-rw-r--r--third_party/nix/src/libexpr/get-drvs.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/third_party/nix/src/libexpr/get-drvs.cc b/third_party/nix/src/libexpr/get-drvs.cc
index d21e8ba896ca..33bded2fa265 100644
--- a/third_party/nix/src/libexpr/get-drvs.cc
+++ b/third_party/nix/src/libexpr/get-drvs.cc
@@ -292,9 +292,8 @@ bool DrvInfo::queryMetaBool(const std::string& name, bool def) {
 }
 
 void DrvInfo::setMeta(const std::string& name, Value* v) {
-  getMeta();
-  Bindings* old = meta;
-  meta = Bindings::NewGC(old->size());
+  Bindings* old = getMeta();
+  meta = Bindings::NewGC(old->size() + 1);
   Symbol sym = state->symbols.Create(name);
   if (old != nullptr) {
     for (auto i : *old) {