summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJafar Al-Gharaibeh <jafar@atcorp.com>2025-04-02 14:13:37 -0500
committerGitHub <noreply@github.com>2025-04-02 14:13:37 -0500
commit994fdeeb22567dae4bd65c38cf1db5d6dd74d4c4 (patch)
treef38cec667206cd7d4e36f5d63b65e6e5975578e7
parentd9a00d25d9da341f70efb1f461d628709dd07d0a (diff)
parent694fb7f48fb19fe22b42b651d58876833e461d94 (diff)
Merge pull request #18525 from donaldsharp/eigrp_coverity_newly_found
eigrpd: Fix possible use after free in nbr deletion
-rw-r--r--eigrpd/eigrp_vty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/eigrpd/eigrp_vty.c b/eigrpd/eigrp_vty.c
index e68b85d801..1a81a338bb 100644
--- a/eigrpd/eigrp_vty.c
+++ b/eigrpd/eigrp_vty.c
@@ -333,7 +333,7 @@ DEFPY (clear_ip_eigrp_neighbors,
eigrp_hello_send(ei, EIGRP_HELLO_GRACEFUL_SHUTDOWN, NULL);
/* iterate over all neighbors on eigrp interface */
- frr_each (eigrp_nbr_hash, &ei->nbr_hash_head, nbr) {
+ frr_each_safe (eigrp_nbr_hash, &ei->nbr_hash_head, nbr) {
if (nbr->state != EIGRP_NEIGHBOR_DOWN) {
zlog_debug(
"Neighbor %pI4 (%s) is down: manually cleared",
@@ -393,7 +393,7 @@ DEFPY (clear_ip_eigrp_neighbors_int,
eigrp_hello_send(ei, EIGRP_HELLO_GRACEFUL_SHUTDOWN, NULL);
/* iterate over all neighbors on eigrp interface */
- frr_each (eigrp_nbr_hash, &ei->nbr_hash_head, nbr) {
+ frr_each_safe (eigrp_nbr_hash, &ei->nbr_hash_head, nbr) {
if (nbr->state != EIGRP_NEIGHBOR_DOWN) {
zlog_debug(
"Neighbor %pI4 (%s) is down: manually cleared",