mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-28 16:06:20 +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);
|
||||
}
|
||||
}
|
||||
if (use_json) {
|
||||
struct prefix *p;
|
||||
if (use_json && rm) {
|
||||
char buf_a[BUFSIZ];
|
||||
char buf_b[BUFSIZ];
|
||||
p = &rm->p;
|
||||
sprintf(buf_a, "%s/%d",
|
||||
inet_ntop(p->family, &p->u.prefix,
|
||||
inet_ntop(rm->p.family, rm->p.u.val,
|
||||
buf_b, BUFSIZ),
|
||||
p->prefixlen);
|
||||
rm->p.prefixlen);
|
||||
json_object_object_add(json_routes, buf_a,
|
||||
json_array);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user