diff options
| author | Carmine Scarpitta <cscarpit@cisco.com> | 2023-09-15 12:25:50 +0200 |
|---|---|---|
| committer | Carmine Scarpitta <cscarpit@cisco.com> | 2023-09-15 17:42:04 +0200 |
| commit | f3b4e6664fb8476342dbc90bb6016dac20c5cace (patch) | |
| tree | 0393d1743d632f1eeb5238a1e870c2266a268acd /pathd/path_pcep_debug.c | |
| parent | 95eadb506816ed6b1bffdf8f0b7dfc7a8f16c3fb (diff) | |
isisd: Fix CID 1568132 (Null pointer dereference)
Null checking the `sra` pointer after dereferencing it causes a
coverity issue. Let's perform the null check before dereferencing the
pointer.
Fixes this coverity issue:
*** CID 1568132: Null pointer dereferences (REVERSE_INULL)
/isisd/isis_zebra.c: 1023 in isis_zebra_srv6_adj_sid_install()
1017 struct seg6local_context ctx = {};
1018 uint16_t prefixlen = IPV6_MAX_BITLEN;
1019 struct interface *ifp;
1020 struct isis_circuit *circuit = sra->adj->circuit;
1021 struct isis_area *area = circuit->area;
1022
>>> CID 1568132: Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "sra" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
1023 if (!sra)
1024 return;
1025
1026 sr_debug("ISIS-SRv6 (%s): setting adjacency SID %pI6", area->area_tag,
1027 &sra->sid);
1028
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Diffstat (limited to 'pathd/path_pcep_debug.c')
0 files changed, 0 insertions, 0 deletions
