Fix memory leak in Message move operator (#4344)

This commit is contained in:
Christopher Berner 2017-06-12 11:23:55 -07:00 committed by Wouter van Oortmerssen
parent b1740688bf
commit 0a81eb6463
1 changed files with 1 additions and 0 deletions

View File

@ -47,6 +47,7 @@ class Message {
Message(const Message &other) = delete;
Message &operator=(Message &&other) {
grpc_slice_unref(slice_);
slice_ = other.slice_;
other.slice_ = grpc_empty_slice();
return *this;