aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/filters/secqueue.cpp3
-rw-r--r--src/lib/x509/x509_ext.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/filters/secqueue.cpp b/src/lib/filters/secqueue.cpp
index feaa26b4c..4b1a263a8 100644
--- a/src/lib/filters/secqueue.cpp
+++ b/src/lib/filters/secqueue.cpp
@@ -103,6 +103,9 @@ void SecureQueue::destroy()
*/
SecureQueue& SecureQueue::operator=(const SecureQueue& input)
{
+ if(this == &input)
+ return *this;
+
destroy();
m_bytes_read = input.get_bytes_read();
m_head = m_tail = new SecureQueueNode;
diff --git a/src/lib/x509/x509_ext.cpp b/src/lib/x509/x509_ext.cpp
index d71af82b7..3141d3c44 100644
--- a/src/lib/x509/x509_ext.cpp
+++ b/src/lib/x509/x509_ext.cpp
@@ -57,6 +57,9 @@ Extensions::Extensions(const Extensions& extensions) : ASN1_Object()
*/
Extensions& Extensions::operator=(const Extensions& other)
{
+ if(this == &other)
+ return *this;
+
m_extensions.clear();
for(size_t i = 0; i != other.m_extensions.size(); ++i)