diff options
author | Neale Ranns <nranns@cisco.com> | 2019-11-21 09:37:41 +0000 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2020-08-12 01:22:20 +0000 |
commit | 8658b077aee8812e7f9be4fbfc990978f5197eef (patch) | |
tree | f7749d97a95019075147982d21ffae98aff26fcc /src | |
parent | 29cd29616d2c4f80e669e11efb46e67db7124813 (diff) |
fib: Another realloc burn
Type: fix
harmless this time since it only affects the debug statement, but
it still crashes an ASAN image.
Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Ie02e7fe3014b98b9f8c83447f59017a380ab3948
(cherry picked from commit 981a690b7d25c96ea56f95ece693377f95b93fc1)
Diffstat (limited to 'src')
-rw-r--r-- | src/vnet/fib/fib_entry.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/vnet/fib/fib_entry.c b/src/vnet/fib/fib_entry.c index 833fcb33fcd..fd69db989f2 100644 --- a/src/vnet/fib/fib_entry.c +++ b/src/vnet/fib/fib_entry.c @@ -712,7 +712,7 @@ fib_entry_post_flag_update_actions (fib_entry_t *fib_entry, return (fib_entry); } -static void +static fib_entry_t* fib_entry_post_install_actions (fib_entry_t *fib_entry, fib_source_t source, fib_entry_flag_t old_flags) @@ -720,6 +720,8 @@ fib_entry_post_install_actions (fib_entry_t *fib_entry, fib_entry = fib_entry_post_flag_update_actions(fib_entry, old_flags); fib_entry_src_action_installed(fib_entry, source); + + return (fib_entry); } fib_node_index_t @@ -754,7 +756,8 @@ fib_entry_create (u32 fib_index, fib_entry = fib_entry_get(fib_entry_index); fib_entry_src_action_activate(fib_entry, source); - fib_entry_post_install_actions(fib_entry, source, FIB_ENTRY_FLAG_NONE); + fib_entry = fib_entry_post_install_actions(fib_entry, source, + FIB_ENTRY_FLAG_NONE); FIB_ENTRY_DBG(fib_entry, "create"); @@ -782,7 +785,8 @@ fib_entry_create_special (u32 fib_index, fib_entry = fib_entry_src_action_add(fib_entry, source, flags, dpo); fib_entry_src_action_activate(fib_entry, source); - fib_entry_post_install_actions(fib_entry, source, FIB_ENTRY_FLAG_NONE); + fib_entry = fib_entry_post_install_actions(fib_entry, source, + FIB_ENTRY_FLAG_NONE); FIB_ENTRY_DBG(fib_entry, "create-special"); @@ -1308,7 +1312,9 @@ fib_entry_cover_changed (fib_node_index_t fib_entry_index) fib_entry_src_action_reactivate(fib_entry, fib_entry_src_get_source( fib_entry_get_best_src_i(fib_entry))); - fib_entry_post_install_actions(fib_entry, best_source, bflags); + fib_entry = fib_entry_post_install_actions(fib_entry, + best_source, + bflags); } else { @@ -1382,7 +1388,9 @@ fib_entry_cover_updated (fib_node_index_t fib_entry_index) fib_entry_src_action_reactivate(fib_entry, fib_entry_src_get_source( fib_entry_get_best_src_i(fib_entry))); - fib_entry_post_install_actions(fib_entry, best_source, bflags); + fib_entry = fib_entry_post_install_actions(fib_entry, + best_source, + bflags); } else { |