summaryrefslogtreecommitdiffstats
path: root/isisd
diff options
context:
space:
mode:
authorLouis Scalbert <louis.scalbert@6wind.com>2023-04-19 14:59:57 +0200
committerLouis Scalbert <louis.scalbert@6wind.com>2023-04-20 16:23:50 +0200
commiteb2010de2af4a9914b0a1218f643424148ac5a4a (patch)
treefa611057aaa2652ef9c5ca5986bb23973b2d807b /isisd
parentisisd: fix overrun in isis_flex_algo_constraint_drop() (diff)
downloadfrr-eb2010de2af4a9914b0a1218f643424148ac5a4a.tar.xz
frr-eb2010de2af4a9914b0a1218f643424148ac5a4a.zip
isisd: fix potential null pointer in isis_affinity_map_check_use()
Reported by coverity scanner #1560313 Do not consider the affinity map is in use if the main isis struct is not yet created. Fixes: 9a65cf35da ("isisd: add affinity-map configuration hooks") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'isisd')
-rw-r--r--isisd/isis_affinitymap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/isisd/isis_affinitymap.c b/isisd/isis_affinitymap.c
index e681e820b..3160427e4 100644
--- a/isisd/isis_affinitymap.c
+++ b/isisd/isis_affinitymap.c
@@ -20,6 +20,9 @@ static bool isis_affinity_map_check_use(const char *affmap_name)
struct affinity_map *map;
uint16_t pos;
+ if (!isis)
+ return false;
+
map = affinity_map_get(affmap_name);
pos = map->bit_position;