diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2017-07-26 03:36:00 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2017-07-31 13:56:44 +0200 |
commit | 1e4c86735790cb6c2ffde24fc64841de0541b723 (patch) | |
tree | 5e58cb97f75a4ecb46779e755ef0211b081ae948 /ldpd | |
parent | ldpd: add auto-complete for l2vpns (diff) | |
download | frr-1e4c86735790cb6c2ffde24fc64841de0541b723.tar.xz frr-1e4c86735790cb6c2ffde24fc64841de0541b723.zip |
ldpd: silence coverity scan warning
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ldpd')
-rw-r--r-- | ldpd/lde.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ldpd/lde.c b/ldpd/lde.c index 602dc8805..77643ff48 100644 --- a/ldpd/lde.c +++ b/ldpd/lde.c @@ -1328,7 +1328,6 @@ lde_nbr_addr_update(struct lde_nbr *ln, struct lde_addr *lde_addr, int removed) struct lde_map *me; RB_FOREACH(fec, fec_tree, &ln->recv_map) { - fn = (struct fec_node *)fec_find(&ft, fec); switch (fec->type) { case FEC_TYPE_IPV4: if (lde_addr->af != AF_INET) @@ -1342,6 +1341,11 @@ lde_nbr_addr_update(struct lde_nbr *ln, struct lde_addr *lde_addr, int removed) continue; } + fn = (struct fec_node *)fec_find(&ft, fec); + if (fn == NULL) + /* shouldn't happen */ + continue; + LIST_FOREACH(fnh, &fn->nexthops, entry) { if (ldp_addrcmp(fnh->af, &fnh->nexthop, &lde_addr->addr)) |