mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 21:47:15 +02:00
Merge pull request #14862 from louis-6wind/fix-ctx-iptable
zebra: fix dplane_ctx_iptable use-after-free
This commit is contained in:
commit
d1e11d48d4
|
@ -4047,6 +4047,7 @@ static int dplane_ctx_iptable_init(struct zebra_dplane_ctx *ctx,
|
||||||
|
|
||||||
ctx->zd_vrf_id = iptable->vrf_id;
|
ctx->zd_vrf_id = iptable->vrf_id;
|
||||||
memcpy(&ctx->u.iptable, iptable, sizeof(struct zebra_pbr_iptable));
|
memcpy(&ctx->u.iptable, iptable, sizeof(struct zebra_pbr_iptable));
|
||||||
|
ctx->u.iptable.interface_name_list = NULL;
|
||||||
if (iptable->nb_interface > 0) {
|
if (iptable->nb_interface > 0) {
|
||||||
ctx->u.iptable.interface_name_list = list_new();
|
ctx->u.iptable.interface_name_list = list_new();
|
||||||
ctx->u.iptable.interface_name_list->del =
|
ctx->u.iptable.interface_name_list->del =
|
||||||
|
|
Loading…
Reference in a new issue