summaryrefslogtreecommitdiff
path: root/bgpd/bgpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgpd.c')
-rw-r--r--bgpd/bgpd.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 7b60c4fc17..edda82b63c 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -4257,12 +4257,11 @@ int bgp_delete(struct bgp *bgp)
bgp_set_evpn(bgp_get_default());
}
- if (bgp->process_queue)
- work_queue_free_and_null(&bgp->process_queue);
-
- if (!IS_BGP_INSTANCE_HIDDEN(bgp))
+ if (!IS_BGP_INSTANCE_HIDDEN(bgp)) {
+ if (bgp->process_queue)
+ work_queue_free_and_null(&bgp->process_queue);
bgp_unlock(bgp); /* initial reference */
- else {
+ } else {
for (afi = AFI_IP; afi < AFI_MAX; afi++) {
enum vpn_policy_direction dir;