Fix memory leak in Message move operator (#4344)
This commit is contained in:
parent
b1740688bf
commit
0a81eb6463
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue