void offset_list_del(struct rip_offset_list *offset)
{
listnode_delete(offset->rip->offset_list_master, offset);
+ offset_list_free(offset);
+}
+
+void offset_list_free(struct rip_offset_list *offset)
+{
if (OFFSET_LIST_IN_NAME(offset))
free(OFFSET_LIST_IN_NAME(offset));
if (OFFSET_LIST_OUT_NAME(offset))
rip->passive_nondefault = vector_init(1);
rip->offset_list_master = list_new();
rip->offset_list_master->cmp = (int (*)(void *, void *))offset_list_cmp;
- rip->offset_list_master->del = (void (*)(void *))offset_list_del;
+ rip->offset_list_master->del = (void (*)(void *))offset_list_free;
/* Distribute list install. */
rip->distribute_ctx = distribute_list_ctx_create(vrf);
extern struct rip_offset_list *rip_offset_list_new(struct rip *rip,
const char *ifname);
extern void offset_list_del(struct rip_offset_list *offset);
+extern void offset_list_free(struct rip_offset_list *offset);
extern struct rip_offset_list *rip_offset_list_lookup(struct rip *rip,
const char *ifname);
extern int rip_offset_list_apply_in(struct prefix_ipv4 *, struct interface *,
void ripng_offset_list_del(struct ripng_offset_list *offset)
{
listnode_delete(offset->ripng->offset_list_master, offset);
+ ripng_offset_list_free(offset);
+}
+
+void ripng_offset_list_free(struct ripng_offset_list *offset)
+{
if (OFFSET_LIST_IN_NAME(offset))
free(OFFSET_LIST_IN_NAME(offset));
if (OFFSET_LIST_OUT_NAME(offset))
ripng->offset_list_master->cmp =
(int (*)(void *, void *))offset_list_cmp;
ripng->offset_list_master->del =
- (void (*)(void *))ripng_offset_list_del;
+ (void (*)(void *))ripng_offset_list_free;
ripng->distribute_ctx = distribute_list_ctx_create(vrf);
distribute_list_add_hook(ripng->distribute_ctx,
ripng_distribute_update);
extern struct ripng_offset_list *ripng_offset_list_new(struct ripng *ripng,
const char *ifname);
extern void ripng_offset_list_del(struct ripng_offset_list *offset);
+extern void ripng_offset_list_free(struct ripng_offset_list *offset);
extern struct ripng_offset_list *ripng_offset_list_lookup(struct ripng *ripng,
const char *ifname);
extern int ripng_offset_list_apply_in(struct ripng *ripng,