diff --git a/third_party/nix/src/libstore/download.cc b/third_party/nix/src/libstore/download.cc index e73181e73..fdc14b376 100644 --- a/third_party/nix/src/libstore/download.cc +++ b/third_party/nix/src/libstore/download.cc @@ -835,7 +835,8 @@ void Downloader::download(DownloadRequest&& request, Sink& sink) { state.wait(state->avail); } - chunk = state->data; + chunk = std::move(state->data); + state->data = std::string(); state->request.notify_one(); }