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 /controller | |
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 'controller')
-rw-r--r-- | controller/SqliteNetworkController.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/controller/SqliteNetworkController.cpp b/controller/SqliteNetworkController.cpp index eb8e399b..9e4c1908 100644 --- a/controller/SqliteNetworkController.cpp +++ b/controller/SqliteNetworkController.cpp @@ -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()) |