summaryrefslogtreecommitdiffstats
path: root/src/vnet/adj
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2023-01-26 17:16:54 +0100
committerNeale Ranns <neale@graphiant.com>2023-02-02 00:09:40 +0000
commit3220d9f16b3db05fe9ea8d756395cd8aa7755863 (patch)
tree0dbf48078acc49823599d7589e835736ec1f6db6 /src/vnet/adj
parentab4d9174d890bff4c07b44957a20eacb33c88172 (diff)
fib: keep AddressSanitizer happy
adj_delegate_remove() makes 'ad' invalid, invalidate it only after its use. Type: fix Change-Id: I6908d3dd2962ebd3fdf37e946cb19dae727bda09 Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/vnet/adj')
-rw-r--r--src/vnet/adj/adj_midchain_delegate.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/vnet/adj/adj_midchain_delegate.c b/src/vnet/adj/adj_midchain_delegate.c
index de57442ac9b..16129ff86ac 100644
--- a/src/vnet/adj/adj_midchain_delegate.c
+++ b/src/vnet/adj/adj_midchain_delegate.c
@@ -148,12 +148,11 @@ adj_midchain_delegate_remove (adj_index_t ai)
{
adj_nbr_midchain_unstack(ai);
- adj_delegate_remove (ai, ADJ_DELEGATE_MIDCHAIN);
-
amd = pool_elt_at_index(amd_pool, ad->ad_index);
fib_entry_untrack(amd->amd_fei, amd->amd_sibling);
-
pool_put(amd_pool, amd);
+
+ adj_delegate_remove (ai, ADJ_DELEGATE_MIDCHAIN);
}
}