summaryrefslogtreecommitdiff
path: root/proto/radv/radv.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2021-11-30 18:16:49 +0100
committerMaria Matejka <mq@ucw.cz>2021-11-30 21:38:25 +0100
commit385b3ea3956aefc2868cdd838fc0a90f1d8a7857 (patch)
treed954b853724153e4a2411d57be5f29e5b9236251 /proto/radv/radv.c
parentab0994a10c26bd76b4154a675267d96d19dfb509 (diff)
For safer memory allocations, resources are bound to loops.
Also all loops have their basic resource pool for allocations which are auto-freed when the loop is stopping.
Diffstat (limited to 'proto/radv/radv.c')
-rw-r--r--proto/radv/radv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/proto/radv/radv.c b/proto/radv/radv.c
index d572c1b7..b0f15514 100644
--- a/proto/radv/radv.c
+++ b/proto/radv/radv.c
@@ -284,7 +284,7 @@ radv_iface_new(struct radv_proto *p, struct iface *iface, struct radv_iface_conf
RADV_TRACE(D_EVENTS, "Adding interface %s", iface->name);
- pool *pool = rp_new(p->p.pool, iface->name);
+ pool *pool = rp_new(p->p.pool, p->p.loop, iface->name);
ifa = mb_allocz(pool, sizeof(struct radv_iface));
ifa->pool = pool;
ifa->ra = p;
@@ -317,7 +317,7 @@ radv_iface_remove(struct radv_iface *ifa)
rem_node(NODE ifa);
- rfree(ifa->pool);
+ rp_free(ifa->pool, p->p.pool);
}
static void