Merge pull request #7991 from donaldsharp/valgrind_cleanups1

Valgrind cleanups
This commit is contained in:
Russ White 2021-02-02 07:30:06 -05:00 committed by GitHub
commit a67b8731d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -210,7 +210,7 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old,
struct ospf6_route *route, struct ospf6_route *route,
struct ospf6 *ospf6) struct ospf6 *ospf6)
{ {
struct ospf6_route *old_route; struct ospf6_route *old_route, *next_route;
struct ospf6_path *ecmp_path, *o_path = NULL; struct ospf6_path *ecmp_path, *o_path = NULL;
struct listnode *anode, *anext; struct listnode *anode, *anext;
struct listnode *nnode, *rnode, *rnext; struct listnode *nnode, *rnode, *rnext;
@ -220,9 +220,11 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old,
/* check for old entry match with new route origin, /* check for old entry match with new route origin,
* delete old entry. * delete old entry.
*/ */
for (old_route = old; old_route; old_route = old_route->next) { for (old_route = old; old_route; old_route = next_route) {
bool route_updated = false; bool route_updated = false;
next_route = old_route->next;
if (!ospf6_route_is_same(old_route, route) if (!ospf6_route_is_same(old_route, route)
|| (old_route->path.type != route->path.type)) || (old_route->path.type != route->path.type))
continue; continue;
@ -315,6 +317,8 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old,
old_route->path.cost, old_route->path.cost,
route->path.cost); route->path.cost);
} }
if (old == old_route)
old = next_route;
ospf6_route_remove(old_route, ospf6_route_remove(old_route,
ospf6->route_table); ospf6->route_table);
} }

View File

@ -104,6 +104,7 @@ static void zserv_encode_vrf(struct stream *s, struct zebra_vrf *zvrf)
struct vrf_data data; struct vrf_data data;
const char *netns_name = zvrf_ns_name(zvrf); const char *netns_name = zvrf_ns_name(zvrf);
memset(&data, 0, sizeof(data));
data.l.table_id = zvrf->table_id; data.l.table_id = zvrf->table_id;
if (netns_name) if (netns_name)