]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: verify that multipath infos are set
authorQuentin Young <qlyoung@cumulusnetworks.com>
Wed, 11 Apr 2018 19:26:28 +0000 (15:26 -0400)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 13 Apr 2018 21:17:42 +0000 (17:17 -0400)
Makes clang-analyze happy

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
bgpd/bgp_mpath.c

index e33f3d34779933eb28a0d08dbe12edcdd77805f5..915387ca2defc86c42030743f8686fcb9c847fd7 100644 (file)
@@ -592,6 +592,8 @@ void bgp_info_mpath_update(struct bgp_node *rn, struct bgp_info *new_best,
                         */
                        new_mpath = listgetdata(mp_node);
                        list_delete_node(mp_list, mp_node);
+                       assert(new_mpath);
+                       assert(prev_mpath);
                        if ((mpath_count < maxpaths) && (new_mpath != new_best)
                            && bgp_info_nexthop_cmp(prev_mpath, new_mpath)) {
                                if (new_mpath == next_mpath)