summaryrefslogtreecommitdiffstats
path: root/ffd/neigh.c
diff options
context:
space:
mode:
Diffstat (limited to 'ffd/neigh.c')
-rw-r--r--ffd/neigh.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ffd/neigh.c b/ffd/neigh.c
index 1b0d41d..2c73362 100644
--- a/ffd/neigh.c
+++ b/ffd/neigh.c
@@ -55,6 +55,11 @@ void ffd_neigh_unref_list(ffd_neigh_t *neigh) {
}
}
+void ffd_neigh_unref(ffd_neigh_t *neigh) {
+ if (!(--neigh->ref) && !neigh->iface)
+ free(neigh);
+}
+
uint16_t ffd_neigh_get_rxcost(const ffd_neigh_t *neigh) {
if (!neigh->hello_log || !neigh->hello_interval || !neigh->iface)
return 0xffff;