Skip to content

Commit 81a239a

Browse files
zebra: backpressure - Fix Null ptr access (Coverity Issue)
Fix dereferencing NULL ptr making coverity happy. Ticket :#3390099 Signed-off-by: Rajasekar Raja <[email protected]>
1 parent 692f916 commit 81a239a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bgpd/bgp_zebra.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -1781,8 +1781,13 @@ static void bgp_handle_route_announcements_to_zebra(struct event *e)
17811781
break;
17821782

17831783
table = bgp_dest_table(dest);
1784+
/*
1785+
* Table cannot be NULL.
1786+
* This logic of new zebra list is not applicable during cleanup.
1787+
*/
1788+
assert(table);
17841789
install = CHECK_FLAG(dest->flags, BGP_NODE_SCHEDULE_FOR_INSTALL);
1785-
if (table && table->afi == AFI_L2VPN && table->safi == SAFI_EVPN)
1790+
if (table->afi == AFI_L2VPN && table->safi == SAFI_EVPN)
17861791
is_evpn = true;
17871792

17881793
if (BGP_DEBUG(zebra, ZEBRA))

0 commit comments

Comments
 (0)