Commit 0a81eb64 authored by Christopher Berner's avatar Christopher Berner Committed by Wouter van Oortmerssen

Fix memory leak in Message move operator (#4344)

parent b1740688
...@@ -47,6 +47,7 @@ class Message { ...@@ -47,6 +47,7 @@ class Message {
Message(const Message &other) = delete; Message(const Message &other) = delete;
Message &operator=(Message &&other) { Message &operator=(Message &&other) {
grpc_slice_unref(slice_);
slice_ = other.slice_; slice_ = other.slice_;
other.slice_ = grpc_empty_slice(); other.slice_ = grpc_empty_slice();
return *this; return *this;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment