diff --git a/src/diskio/mod.rs b/src/diskio/mod.rs index d82d31196d..01a5de1963 100644 --- a/src/diskio/mod.rs +++ b/src/diskio/mod.rs @@ -343,6 +343,7 @@ pub fn write_file_incremental, F: Fn(usize)>( { trace_scoped!("write_segment", "name": path_display, "len": len); f.write_all(&contents)?; + drop(contents); chunk_complete_callback(len); } }