summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/bridge/br_netlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index 204472449ec9..200ad05b296f 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -119,7 +119,7 @@ static size_t br_get_link_af_size_filtered(const struct net_device *dev,
/* Each VLAN is returned in bridge_vlan_info along with flags */
vinfo_sz += num_vlan_infos * nla_total_size(sizeof(struct bridge_vlan_info));
- if (vg && (filter_mask & RTEXT_FILTER_MST))
+ if (p && vg && (filter_mask & RTEXT_FILTER_MST))
vinfo_sz += br_mst_info_size(vg);
if (!(filter_mask & RTEXT_FILTER_CFM_STATUS))