diff options
author | 2018-11-07 09:42:49 -0800 | |
---|---|---|
committer | 2018-11-07 12:33:19 -0800 | |
commit | 432b34bf7430fd01f7dd3b4e7ba262846bbe1b7c (patch) | |
tree | dc79a9db6cc066844052b89ac19a619775613655 /test/cpp/qps/server_async.cc | |
parent | 35e1f9fa6a318dac3fe232d99a5a41768f12197f (diff) |
Initialize value before creating slice
Diffstat (limited to 'test/cpp/qps/server_async.cc')
-rw-r--r-- | test/cpp/qps/server_async.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index 5cd975cf74..a5f8347c26 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -562,6 +562,7 @@ static Status ProcessGenericRPC(const PayloadConfig& payload_config, request->Clear(); int resp_size = payload_config.bytebuf_params().resp_size(); std::unique_ptr<char[]> buf(new char[resp_size]); + memset(buf.get(), 0, static_cast<size_t>(resp_size)); Slice slice(buf.get(), resp_size); *response = ByteBuffer(&slice, 1); return Status::OK; |