Skip to content
Snippets Groups Projects
Commit 660440c1 authored by Martine Lenders's avatar Martine Lenders
Browse files

gnrc_ipv6_nib/nc: remove from _next_removable on remove

The `_next_removable` list manages the cache-out of the neighbor cache.
However, when a neighbor cache entry is removed, it is not removed
from that list, which may lead to a segmentation fault when that list is
accessed, since the whole entry (including its list pointer) is zeroed
after removal.

With this change the entry is removed from that list accordingly before
the zeroing happens.
parent 56bf7781
No related branches found
No related tags found
No related merge requests found
......@@ -272,6 +272,8 @@ void _nib_nc_remove(_nib_onl_entry_t *node)
entry->pkt = NULL;
}
#endif /* GNRC_IPV6_NIB_CONF_QUEUE_PKT */
/* remove from cache-out procedure */
clist_remove(&_next_removable, (clist_node_t *)node);
_nib_onl_clear(node);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment