Also initialize vlan_flags
Fixes: d82a49ce85f0 ("bridge: add json support for bridge vlan show")
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
struct ifinfomsg *ifm = NLMSG_DATA(n);
int len = n->nlmsg_len;
struct rtattr *tb[IFLA_MAX+1];
- bool vlan_flags;
+ bool vlan_flags = false;
if (n->nlmsg_type != RTM_NEWLINK) {
fprintf(stderr, "Not RTM_NEWLINK: %08x %08x %08x\n",
fprintf(fp, " Egress Untagged");
}
}
- if (vlan_flags) {
+ if (jw_global && vlan_flags) {
jsonw_end_array(jw_global);
vlan_flags = false;
}