]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: fix SA warning 7513/head
authorMark Stapp <mjs@voltanet.io>
Thu, 12 Nov 2020 21:27:31 +0000 (16:27 -0500)
committerMark Stapp <mjs@voltanet.io>
Thu, 12 Nov 2020 21:27:31 +0000 (16:27 -0500)
Fix a coverity warning about an obscure path involving labels.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
bgpd/bgp_route.c

index 9873057fa2471890310ccfca4c845211c769f524..5e7bf3f626ca8ef2972772851f446250978d8ca9 100644 (file)
@@ -3538,6 +3538,9 @@ int bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
        else
                has_valid_label = bgp_is_valid_label(label);
 
+       if (has_valid_label)
+               assert(label != NULL);
+
        /* The flag BGP_NODE_FIB_INSTALL_PENDING is for the following
         * condition :
         * Suppress fib is enabled