summaryrefslogtreecommitdiff
path: root/node/CertificateOfMembership.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-06-29 10:21:28 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-06-29 10:21:28 -0700
commitdbee1b38b3fce2cab93c46157b9144bfab73cf87 (patch)
tree9b2097871c534acf11adedd963808c7190391f90 /node/CertificateOfMembership.cpp
parent3f71afd0fbb2d87a2c9288166299600da51470dc (diff)
downloadinfinitytier-dbee1b38b3fce2cab93c46157b9144bfab73cf87.tar.gz
infinitytier-dbee1b38b3fce2cab93c46157b9144bfab73cf87.zip
Fix semantics of std::unique() to actually remove duplicates (hidden memory leak?)
Diffstat (limited to 'node/CertificateOfMembership.cpp')
-rw-r--r--node/CertificateOfMembership.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/node/CertificateOfMembership.cpp b/node/CertificateOfMembership.cpp
index 15f03cbd..19ce770a 100644
--- a/node/CertificateOfMembership.cpp
+++ b/node/CertificateOfMembership.cpp
@@ -140,7 +140,7 @@ void CertificateOfMembership::fromString(const char *s)
}
std::sort(_qualifiers.begin(),_qualifiers.end());
- std::unique(_qualifiers.begin(),_qualifiers.end());
+ _qualifiers.erase(std::unique(_qualifiers.begin(),_qualifiers.end()),_qualifiers.end());
}
bool CertificateOfMembership::agreesWith(const CertificateOfMembership &other) const