mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-29 21:23:06 +00:00
bgpd: null check (Coverity 1408766)
Signed-off-by: F. Aragon <paco@voltanet.io>
This commit is contained in:
parent
6389e663e9
commit
e105d90456
@ -228,15 +228,13 @@ int show_adj_route_vpn(struct vty *vty, struct peer *peer,
|
|||||||
use_json, json_array);
|
use_json, json_array);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (use_json) {
|
if (use_json && rm) {
|
||||||
struct prefix *p;
|
|
||||||
char buf_a[BUFSIZ];
|
char buf_a[BUFSIZ];
|
||||||
char buf_b[BUFSIZ];
|
char buf_b[BUFSIZ];
|
||||||
p = &rm->p;
|
|
||||||
sprintf(buf_a, "%s/%d",
|
sprintf(buf_a, "%s/%d",
|
||||||
inet_ntop(p->family, &p->u.prefix,
|
inet_ntop(rm->p.family, rm->p.u.val,
|
||||||
buf_b, BUFSIZ),
|
buf_b, BUFSIZ),
|
||||||
p->prefixlen);
|
rm->p.prefixlen);
|
||||||
json_object_object_add(json_routes, buf_a,
|
json_object_object_add(json_routes, buf_a,
|
||||||
json_array);
|
json_array);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user