summaryrefslogtreecommitdiffstats
path: root/zebra/redistribute.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2024-01-05 19:24:59 +0100
committerDonald Sharp <sharpd@nvidia.com>2024-01-09 19:03:43 +0100
commit54ed53f36f42b52fd84ad010d31031454f20bd13 (patch)
treef2117a7d4907aa5fb1f50b41e42ebea806574876 /zebra/redistribute.c
parentbgpd: data is set but never used (diff)
downloadfrr-54ed53f36f42b52fd84ad010d31031454f20bd13.tar.xz
frr-54ed53f36f42b52fd84ad010d31031454f20bd13.zip
zebra: SA incorrectly believes a NULL pointer
SA has decided that old_re could be a NULL pointer even though the zebra_redistribute_check function checks for NULL and returns false that would not allow a NULL pointer deref. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to '')
-rw-r--r--zebra/redistribute.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/zebra/redistribute.c b/zebra/redistribute.c
index 18eac0044..70ace35a8 100644
--- a/zebra/redistribute.c
+++ b/zebra/redistribute.c
@@ -332,6 +332,14 @@ void redistribute_delete(const struct route_node *rn,
/* Send a delete for the 'old' re to any subscribed client. */
if (zebra_redistribute_check(rn, old_re, client)) {
+ /*
+ * SA is complaining that old_re could be false
+ * SA is wrong because old_re is checked for NULL
+ * in zebra_redistribute_check and false is
+ * returned in that case. Let's just make SA
+ * happy.
+ */
+ assert(old_re);
is_table_direct = zebra_redistribute_is_table_direct(old_re);
zsend_redistribute_route(ZEBRA_REDISTRIBUTE_ROUTE_DEL,
client, rn, old_re,