aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2021-10-26 16:23:11 +0200
committerNeale Ranns <neale@graphiant.com>2021-12-07 14:54:57 +0000
commite46ea1d0c5cffcf721d150df86705145ec633e33 (patch)
tree6910f2a6c78943014625e76912be55c41126039d /src/vnet
parent674d5651e2089254c449eba922c784097a1dd070 (diff)
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
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/fib/fib_sas.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/fib/fib_sas.c b/src/vnet/fib/fib_sas.c
index 8abac8672fd..c9d469379f1 100644
--- a/src/vnet/fib/fib_sas.c
+++ b/src/vnet/fib/fib_sas.c
@@ -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 (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);
if (NULL == ll)