fib: fix coverity warning/don't dereference NULL
fib_sas6_get is called with NULL dst explicitly so add a NULL check to avoid a NULL dereference. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I8ebcba98832f374991f5442c1b83a4b6e64771d0
This commit is contained in:

committed by
Neale Ranns

parent
674d5651e2
commit
e46ea1d0c5
@ -112,7 +112,7 @@ fib_sas6_get (u32 sw_if_index,
|
|||||||
/*
|
/*
|
||||||
* if the dst is v6 and link local, use the source link local
|
* if the dst is v6 and link local, use the source link local
|
||||||
*/
|
*/
|
||||||
if (ip6_address_is_link_local_unicast (dst))
|
if (dst && ip6_address_is_link_local_unicast (dst))
|
||||||
{
|
{
|
||||||
const ip6_address_t *ll = ip6_get_link_local_address (sw_if_index);
|
const ip6_address_t *ll = ip6_get_link_local_address (sw_if_index);
|
||||||
if (NULL == ll)
|
if (NULL == ll)
|
||||||
|
Reference in New Issue
Block a user