]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: bgp_distance_unset ensure dest exists
authorDonald Sharp <sharpd@nvidia.com>
Sun, 10 Sep 2023 13:35:38 +0000 (09:35 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Mon, 11 Sep 2023 16:45:59 +0000 (12:45 -0400)
Coverity doesn't understand our locking scheme
make sure it does a bit better.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd/bgp_route.c

index 7d0cc377bd513d49068610f924062ece4eef8cff..4d4a2a5c353b0c25fc1a1a5a5c710e54a674bf95 100644 (file)
@@ -15049,7 +15049,8 @@ static int bgp_distance_unset(struct vty *vty, const char *distance_str,
        bgp_distance_free(bdistance);
 
        bgp_dest_set_bgp_path_info(dest, NULL);
-       bgp_dest_unlock_node(dest);
+       dest = bgp_dest_unlock_node(dest);
+       assert(dest);
        bgp_dest_unlock_node(dest);
 
        return CMD_SUCCESS;