Fix semantics of std::unique() to actually remove duplicates (hidden memory leak?)
This commit is contained in:
parent
3f71afd0fb
commit
dbee1b38b3
9 changed files with 63 additions and 9 deletions
|
@ -389,7 +389,7 @@ NetworkController::ResultCode SqliteNetworkController::doNetworkConfigRequest(co
|
|||
allowedEtherTypes.push_back(et);
|
||||
}
|
||||
std::sort(allowedEtherTypes.begin(),allowedEtherTypes.end());
|
||||
std::unique(allowedEtherTypes.begin(),allowedEtherTypes.end());
|
||||
allowedEtherTypes.erase(std::unique(allowedEtherTypes.begin(),allowedEtherTypes.end()),allowedEtherTypes.end());
|
||||
std::string allowedEtherTypesCsv;
|
||||
for(std::vector<int>::const_iterator i(allowedEtherTypes.begin());i!=allowedEtherTypes.end();++i) {
|
||||
if (allowedEtherTypesCsv.length())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue