diff options
author | Dennis Jackson <djackson@mozilla.com> | 2022-03-22 13:34:07 +0000 |
---|---|---|
committer | Dennis Jackson <djackson@mozilla.com> | 2022-03-22 13:34:07 +0000 |
commit | 12a82009867d23ceb792c5bf7c9fe65708f93dc9 (patch) | |
tree | 29ec32b6990c84eb5df1d2c2df152dbb5d52a6b6 /cpputil | |
parent | 1e1791002a5bddb0b5dee8a75889f312b193ff6e (diff) | |
download | nss-hg-12a82009867d23ceb792c5bf7c9fe65708f93dc9.tar.gz |
Bug 1758478 - Fix DataBuffer Move Assignment. r=mt
Differential Revision: https://phabricator.services.mozilla.com/D141650
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; |