From ebd807c0b8eb0b7a3dc3371cd4c87ae886c00885 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Mon, 4 Apr 2022 20:31:14 +0200 Subject: Slab allocator can free the blocks without knowing the parent structure --- nest/rt-table.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'nest/rt-table.c') diff --git a/nest/rt-table.c b/nest/rt-table.c index a1e49c21..1885e602 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -631,7 +631,7 @@ rte_free(rte *e) rt_unlock_source(e->src); if (rta_is_cached(e->attrs)) rta_free(e->attrs); - sl_free(rte_slab, e); + sl_free(e); } static inline void @@ -639,7 +639,7 @@ rte_free_quick(rte *e) { rt_unlock_source(e->src); rta_free(e->attrs); - sl_free(rte_slab, e); + sl_free(e); } static int /* Actually better or at least as good as */ @@ -3393,7 +3393,7 @@ hc_delete_hostentry(struct hostcache *hc, pool *p, struct hostentry *he) rem_node(&he->ln); hc_remove(hc, he); - sl_free(hc->slab, he); + sl_free(he); hc->hash_items--; if (hc->hash_items < hc->hash_min) -- cgit v1.2.3