From: Lou Berger Date: Mon, 15 May 2017 00:24:25 +0000 (-0400) Subject: bgpd: fix table leak introduced in labeled unicast (Issue #473) X-Git-Tag: reindent-master-before~170^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=0918e873f241d5df4fa38da4a9e7bc414e805559;p=mirror%2Ffrr.git bgpd: fix table leak introduced in labeled unicast (Issue #473) Fix tested for vpn and encap ribs/safi. Labeled unicast may still leak as not tested. Signed-off-by: Lou Berger --- diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 2142719f49..23fc4f8c36 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -1941,9 +1941,9 @@ bgp_process_main (struct work_queue *wq, void *data) * Right now, since we only deal with per-prefix labels, it is not necessary * to do this upon changes to best path except of the label index changes. */ - bgp_table_lock (bgp_node_table (rn)); if (safi == SAFI_LABELED_UNICAST) { + bgp_table_lock (bgp_node_table (rn)); if (new_select) { if (!old_select ||