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 <lberger@labn.net>
This commit is contained in:
Lou Berger 2017-05-14 20:24:25 -04:00
parent 20aeb9709e
commit 0918e873f2

View File

@ -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 ||