summaryrefslogtreecommitdiffstats
path: root/sharpd/sharp_nht.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 04:24:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 04:24:31 +0000
commitacb594b1d825c6e12369cebb941968ec08c840ce (patch)
treed544788908e7353a4f117e2991f15f4236a0c963 /sharpd/sharp_nht.c
parentAdding upstream version 9.1. (diff)
downloadfrr-acb594b1d825c6e12369cebb941968ec08c840ce.tar.xz
frr-acb594b1d825c6e12369cebb941968ec08c840ce.zip
Adding upstream version 10.0.upstream/10.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sharpd/sharp_nht.c')
-rw-r--r--sharpd/sharp_nht.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sharpd/sharp_nht.c b/sharpd/sharp_nht.c
index fa78805..6d64fcf 100644
--- a/sharpd/sharp_nht.c
+++ b/sharpd/sharp_nht.c
@@ -40,6 +40,11 @@ struct sharp_nh_tracker *sharp_nh_tracker_get(struct prefix *p)
return nht;
}
+void sharp_nh_tracker_free(struct sharp_nh_tracker *nht)
+{
+ XFREE(MTYPE_NH_TRACKER, nht);
+}
+
void sharp_nh_tracker_dump(struct vty *vty)
{
struct listnode *node;
@@ -169,7 +174,8 @@ static void sharp_nhgroup_delete_cb(const char *name)
if (!snhg)
return;
- nhg_del(snhg->id);
+ if (sharp_nhgroup_id_is_installed(snhg->id))
+ nhg_del(snhg->id);
sharp_nhg_rb_del(&nhg_head, snhg);
XFREE(MTYPE_NHG, snhg);
}