diff options
Diffstat (limited to 'cpputil')
-rw-r--r-- | cpputil/databuffer.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cpputil/databuffer.h b/cpputil/databuffer.h index 8d34e1a7d..d7c80b4bb 100644 --- a/cpputil/databuffer.h +++ b/cpputil/databuffer.h @@ -33,7 +33,8 @@ class DataBuffer { return *this; } DataBuffer& operator=(DataBuffer&& other) { - if (this == &other) { + if (this != &other) { + delete[] data_; data_ = other.data_; len_ = other.len_; other.data_ = nullptr; |