commit | 1717b24efd92a87e9ccbdc0622f0591e9a093d87 | [log] [tgz] |
---|---|---|
author | Alexander Afanasyev <alexander.afanasyev@ucla.edu> | Tue Jul 15 13:53:17 2014 -0700 |
committer | Alexander Afanasyev <alexander.afanasyev@ucla.edu> | Tue Jul 15 13:53:17 2014 -0700 |
tree | 1ad6b9f4f42b34f400487413c2d4842ef342059f | |
parent | cc82753e8d589261a277589dcb849cd33afbfb84 [diff] |
route: Preventing small bug with accessing of unallocated memory Change-Id: I79c2099b2400aca78bbdb6d7de2f68d3f659e2b6
diff --git a/src/route/nexthop-list.cpp b/src/route/nexthop-list.cpp index 6159563..7a8572d 100644 --- a/src/route/nexthop-list.cpp +++ b/src/route/nexthop-list.cpp
@@ -66,6 +66,7 @@ ndn::bind(&nexthopCompare, _1, nh)); if (it == m_nexthopList.end()) { m_nexthopList.push_back(nh); + return; } if ((*it).getRouteCost() > nh.getRouteCost()) { (*it).setRouteCost(nh.getRouteCost());