2019-08-25 04:43:57 +08:00
|
|
|
diff --git a/src/core/lib/slice/slice.cc b/src/core/lib/slice/slice.cc
|
2020-01-03 06:10:19 +08:00
|
|
|
index d3480abaa8..b3e63b2433 100644
|
2019-08-25 04:43:57 +08:00
|
|
|
--- a/src/core/lib/slice/slice.cc
|
|
|
|
+++ b/src/core/lib/slice/slice.cc
|
2020-01-03 06:10:19 +08:00
|
|
|
@@ -226,6 +226,7 @@ grpc_slice grpc_slice_from_moved_buffer(grpc_core::UniquePtr<char> p,
|
2019-08-25 04:43:57 +08:00
|
|
|
size_t len) {
|
|
|
|
uint8_t* ptr = reinterpret_cast<uint8_t*>(p.get());
|
|
|
|
grpc_slice slice;
|
|
|
|
+ memset(&slice, 0, sizeof(grpc_slice));
|
|
|
|
if (len <= sizeof(slice.data.inlined.bytes)) {
|
|
|
|
slice.refcount = nullptr;
|
|
|
|
slice.data.inlined.length = len;
|