forked from BigfootDev/flatbuffers
Fix memory leak in Message move operator (#4344)
This commit is contained in:
committed by
Wouter van Oortmerssen
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;
|
||||
|
||||
Reference in New Issue
Block a user