Skip to content

Commit

Permalink
Fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
allada committed Jan 3, 2021
1 parent 0b304cc commit c27685c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cas/grpc_service/bytestream_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl ByteStreamServer {
.err_tip(|| "Could not unwrap first stream message")?;

let raw_buffer = vec![0u8; self.max_stream_buffer_size].into_boxed_slice();
let (rx, mut tx) = tokio::io::split(AsyncFixedBuf::new(Box::leak(raw_buffer)));
let (rx, mut tx) = tokio::io::split(AsyncFixedBuf::new(raw_buffer));

let join_handle = {
let store = self.store.clone();
Expand Down

0 comments on commit c27685c

Please sign in to comment.