mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 19:02:58 +00:00
lib: fix a64448ba
, invalid NULL->num_labels
We should assume match OK only when neither nhl1 and neither nhl2 are NULL. If both are NULL, it means match NOK. Clang Warning: Access to field 'num_labels' results in a dereference of a null pointer (loaded from variable 'nhl1') Signed-off-by: Vincent Jardin <vincent.jardin@6wind.com>
This commit is contained in:
parent
67533c11d2
commit
3f58e1b3e7
@ -128,7 +128,7 @@ int nexthop_labels_match(struct nexthop *nh1, struct nexthop *nh2)
|
||||
|
||||
nhl1 = nh1->nh_label;
|
||||
nhl2 = nh2->nh_label;
|
||||
if ((nhl1 && !nhl2) || (!nhl1 && nhl2))
|
||||
if (!nhl1 || !nhl2)
|
||||
return 0;
|
||||
|
||||
if (nhl1->num_labels != nhl2->num_labels)
|
||||
|
Loading…
Reference in New Issue
Block a user