From ea9bc28592473e24c6dff85735e7e101a9dde4d4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Beno=C3=AEt=20Ganne?= Date: Thu, 16 Apr 2020 12:40:04 +0200 Subject: [PATCH] ipsec: fix use-after-free MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Type: fix Change-Id: I1068ff1d03883addb5fe1005a8b608eab17e4168 Signed-off-by: Benoît Ganne --- src/vnet/ipsec/ipsec_tun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vnet/ipsec/ipsec_tun.c b/src/vnet/ipsec/ipsec_tun.c index 268f7783ebf..23598b7b085 100644 --- a/src/vnet/ipsec/ipsec_tun.c +++ b/src/vnet/ipsec/ipsec_tun.c @@ -817,8 +817,8 @@ static void ipsec_tun_protect_adj_delegate_adj_deleted (adj_delegate_t * ad) { /* remove our delegate */ - adj_delegate_remove (ad->ad_adj_index, ipsec_tun_adj_delegate_type); ipsec_tun_protect_add_adj (ad->ad_adj_index, INDEX_INVALID); + adj_delegate_remove (ad->ad_adj_index, ipsec_tun_adj_delegate_type); } static void -- 2.16.6