mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 08:32:45 +00:00
zebra: Free labels on nhg_ctx from kernel
If we get a nexthop group from the kernel with labels and queue it as a context to process later, we have to free the label stack we allocated. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
This commit is contained in:
parent
10200d4054
commit
3e347f4181
@ -820,11 +820,21 @@ static int nhg_ctx_process_del(struct nhg_ctx *ctx)
|
||||
|
||||
static void nhg_ctx_process_finish(struct nhg_ctx *ctx)
|
||||
{
|
||||
struct nexthop *nh;
|
||||
|
||||
/*
|
||||
* Just freeing for now, maybe do something more in the future
|
||||
* based on flag.
|
||||
*/
|
||||
|
||||
if (nhg_ctx_get_count(ctx))
|
||||
goto done;
|
||||
|
||||
nh = nhg_ctx_get_nh(ctx);
|
||||
|
||||
nexthop_del_labels(nh);
|
||||
|
||||
done:
|
||||
if (ctx)
|
||||
nhg_ctx_free(ctx);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user