From 70d9b134f69801933e55102901c620ee989e7345 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Sun, 11 Jul 2021 23:39:53 +0300 Subject: [PATCH] bgpd: Don't forget bgp_dest_unlock_node for bgp_static_set() Before returning an error, unlock bgp dest which is locked by bgp_node_lookup(). Signed-off-by: Donatas Abraitis --- bgpd/bgp_route.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 107aa1eb12..bd45314350 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -6052,6 +6052,7 @@ int bgp_static_set(struct bgp *bgp, const char *negate, struct prefix *pfx, && (label_index != bgp_static->label_index)) { snprintf(errmsg, errmsg_len, "label-index doesn't match static route\n"); + bgp_dest_unlock_node(dest); return -1; } @@ -6059,6 +6060,7 @@ int bgp_static_set(struct bgp *bgp, const char *negate, struct prefix *pfx, && strcmp(rmap, bgp_static->rmap.name)) { snprintf(errmsg, errmsg_len, "route-map name doesn't match static route\n"); + bgp_dest_unlock_node(dest); return -1; } -- 2.39.5