From dbee1b38b3fce2cab93c46157b9144bfab73cf87 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 29 Jun 2015 10:21:28 -0700 Subject: Fix semantics of std::unique() to actually remove duplicates (hidden memory leak?) --- node/CertificateOfMembership.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'node/CertificateOfMembership.cpp') 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 -- cgit v1.2.3