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>
This commit is contained in:
Benoît Ganne
committed by
Neale Ranns
parent
ab4d9174d8
commit
3220d9f16b
@ -148,12 +148,11 @@ adj_midchain_delegate_remove (adj_index_t ai)
|
|||||||
{
|
{
|
||||||
adj_nbr_midchain_unstack(ai);
|
adj_nbr_midchain_unstack(ai);
|
||||||
|
|
||||||
adj_delegate_remove (ai, ADJ_DELEGATE_MIDCHAIN);
|
|
||||||
|
|
||||||
amd = pool_elt_at_index(amd_pool, ad->ad_index);
|
amd = pool_elt_at_index(amd_pool, ad->ad_index);
|
||||||
fib_entry_untrack(amd->amd_fei, amd->amd_sibling);
|
fib_entry_untrack(amd->amd_fei, amd->amd_sibling);
|
||||||
|
|
||||||
pool_put(amd_pool, amd);
|
pool_put(amd_pool, amd);
|
||||||
|
|
||||||
|
adj_delegate_remove (ai, ADJ_DELEGATE_MIDCHAIN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user