diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-06-29 10:21:28 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-06-29 10:21:28 -0700 |
commit | dbee1b38b3fce2cab93c46157b9144bfab73cf87 (patch) | |
tree | 9b2097871c534acf11adedd963808c7190391f90 /node/CertificateOfMembership.cpp | |
parent | 3f71afd0fbb2d87a2c9288166299600da51470dc (diff) | |
download | infinitytier-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.cpp | 2 |
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 |