mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 04:15:46 +00:00
zebra: Ensure bvlan is non null
Coverity rightly points out that a call into zebra_l2_bridge_if_vlan_find is NULL checked 4/5 times. Let's make it 5/5 Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
bf9bc2e5f2
commit
578c0b134c
@ -209,6 +209,8 @@ static int zebra_l2_bridge_if_vlan_update(struct interface *ifp,
|
|||||||
|
|
||||||
zif = (struct zebra_if *)ifp->info;
|
zif = (struct zebra_if *)ifp->info;
|
||||||
bvlan = zebra_l2_bridge_if_vlan_find(zif, bvl->vid);
|
bvlan = zebra_l2_bridge_if_vlan_find(zif, bvl->vid);
|
||||||
|
if (!bvlan)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (chgflags & ZEBRA_BRIDGEIF_ACCESS_BD_CHANGE)
|
if (chgflags & ZEBRA_BRIDGEIF_ACCESS_BD_CHANGE)
|
||||||
bvlan->access_bd = bvl->access_bd;
|
bvlan->access_bd = bvl->access_bd;
|
||||||
|
Loading…
Reference in New Issue
Block a user