Skip to content

Commit

Permalink
zebra: backpressure - Fix Null ptr access (Coverity Issue)
Browse files Browse the repository at this point in the history
Fix dereferencing NULL ptr making coverity happy.

Ticket :#3390099

Signed-off-by: Rajasekar Raja <[email protected]>
  • Loading branch information
raja-rajasekar committed Apr 12, 2024
1 parent 692f916 commit 81a239a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bgpd/bgp_zebra.c
Original file line number Diff line number Diff line change
Expand Up @@ -1781,8 +1781,13 @@ static void bgp_handle_route_announcements_to_zebra(struct event *e)
break;

table = bgp_dest_table(dest);
/*
* Table cannot be NULL.
* This logic of new zebra list is not applicable during cleanup.
*/
assert(table);
install = CHECK_FLAG(dest->flags, BGP_NODE_SCHEDULE_FOR_INSTALL);
if (table && table->afi == AFI_L2VPN && table->safi == SAFI_EVPN)
if (table->afi == AFI_L2VPN && table->safi == SAFI_EVPN)
is_evpn = true;

if (BGP_DEBUG(zebra, ZEBRA))
Expand Down

0 comments on commit 81a239a

Please sign in to comment.