diff options
Diffstat (limited to 'src/Buffer.cpp')
-rw-r--r-- | src/Buffer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 002c1eb..ab50f1a 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -97,6 +97,9 @@ Buffer& Buffer::operator=(Buffer&& other) if (&other != this) { m_len = other.m_len; m_capacity = other.m_capacity; + if (m_data != nullptr) { + free(m_data); + } m_data = other.m_data; other.m_len = 0; |