mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 21:10:28 +00:00
bgpd: null chk (Coverity 1433544 1433543 1433542)
Signed-off-by: F. Aragon <paco@voltanet.io>
This commit is contained in:
parent
6389e663e9
commit
c37a11ad72
@ -471,7 +471,7 @@ void bgp_info_mpath_update(struct bgp_node *rn, struct bgp_info *new_best,
|
||||
zlog_debug(
|
||||
"%s: starting mpath update, newbest %s num candidates %d old-mpath-count %d",
|
||||
pfx_buf, new_best ? new_best->peer->host : "NONE",
|
||||
listcount(mp_list), old_mpath_count);
|
||||
mp_list ? listcount(mp_list) : 0, old_mpath_count);
|
||||
|
||||
/*
|
||||
* We perform an ordered walk through both lists in parallel.
|
||||
|
@ -1733,7 +1733,8 @@ void rfapiPrintMatchingDescriptors(struct vty *vty, struct prefix *vn_prefix,
|
||||
int rfapiCliGetPrefixAddr(struct vty *vty, const char *str, struct prefix *p)
|
||||
{
|
||||
if (!str2prefix(str, p)) {
|
||||
vty_out(vty, "Malformed address \"%s\"%s", str, HVTYNL);
|
||||
vty_out(vty, "Malformed address \"%s\"%s", str ? str : "null",
|
||||
HVTYNL);
|
||||
return CMD_WARNING;
|
||||
}
|
||||
switch (p->family) {
|
||||
|
@ -1197,6 +1197,9 @@ int str2prefix(const char *str, struct prefix *p)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (!str || !p)
|
||||
return 0;
|
||||
|
||||
/* First we try to convert string to struct prefix_ipv4. */
|
||||
ret = str2prefix_ipv4(str, (struct prefix_ipv4 *)p);
|
||||
if (ret)
|
||||
|
Loading…
Reference in New Issue
Block a user