mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 11:18:43 +00:00
bgpd: null check (Coverity 23201)
Signed-off-by: F. Aragon <paco@voltanet.io>
This commit is contained in:
parent
9eafc8abd7
commit
a247298087
@ -642,16 +642,12 @@ struct community *community_str2com(const char *str)
|
|||||||
community_add_val(com, val);
|
community_add_val(com, val);
|
||||||
break;
|
break;
|
||||||
case community_token_unknown:
|
case community_token_unknown:
|
||||||
default:
|
|
||||||
if (com)
|
if (com)
|
||||||
community_free(com);
|
community_free(com);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
} while (str);
|
} while (str);
|
||||||
|
|
||||||
if (!com)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
com_sort = community_uniq_sort(com);
|
com_sort = community_uniq_sort(com);
|
||||||
community_free(com);
|
community_free(com);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user