[C++] Add grpc_slice_unref(slice) (#4294)

This commit is contained in:
moti
2017-05-05 07:44:31 +09:00
committed by Wouter van Oortmerssen
parent 86777bd66b
commit 8f8a27d6e5

View File

@@ -37,6 +37,7 @@ class SerializationTraits<T, typename std::enable_if<std::is_base_of<
auto slice = gpr_slice_from_copied_buffer(
reinterpret_cast<const char *>(msg.buf), msg.len);
*buffer = grpc_raw_byte_buffer_create(&slice, 1);
grpc_slice_unref(slice);
*own_buffer = true;
return grpc::Status();
}