mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 07:27:09 +00:00
bgpd: avoid memcmp(NULL, NULL)
Undefined behavior Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
eada87a4ab
commit
5dd7070f73
@ -152,8 +152,9 @@ static bool cluster_hash_cmp(const void *p1, const void *p2)
|
||||
const struct cluster_list *cluster2 = p2;
|
||||
|
||||
return (cluster1->length == cluster2->length
|
||||
&& memcmp(cluster1->list, cluster2->list, cluster1->length)
|
||||
== 0);
|
||||
&& (cluster1->list == cluster2->list
|
||||
|| memcmp(cluster1->list, cluster2->list, cluster1->length)
|
||||
== 0));
|
||||
}
|
||||
|
||||
static void cluster_free(struct cluster_list *cluster)
|
||||
|
Loading…
Reference in New Issue
Block a user