aboutsummaryrefslogtreecommitdiffstats
path: root/src/vat
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2021-10-11 15:08:25 +0000
committerFilip Tehlar <ftehlar@cisco.com>2021-10-11 15:08:25 +0000
commit1fa06c9a0642ebd0d2a7dcaa5359ac47be8f4ffa (patch)
tree4b5624b990993d93d6988928eb5b1f58316aeda1 /src/vat
parent6958c23bd54f38599de63854330020b46cbd24a9 (diff)
vat: move memset after init
Type: fix Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: Ia65fd2f99dfe6538411c247aeb9691c590c2e00b
Diffstat (limited to 'src/vat')
-rw-r--r--src/vat/plugin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vat/plugin.c b/src/vat/plugin.c
index 5c7045415a8..09a96fd2ca4 100644
--- a/src/vat/plugin.c
+++ b/src/vat/plugin.c
@@ -148,6 +148,7 @@ vat_load_new_plugins (plugin_main_t * pm)
if (p == 0)
{
vec_add2 (pm->plugin_info, pi, 1);
+ clib_memset (pi, 0, sizeof (*pi));
pi->name = plugin_name;
pi->file_info = statb;
@@ -157,7 +158,6 @@ vat_load_new_plugins (plugin_main_t * pm)
_vec_len (pm->plugin_info) = vec_len (pm->plugin_info) - 1;
continue;
}
- clib_memset (pi, 0, sizeof (*pi));
hash_set_mem (pm->plugin_by_name_hash, plugin_name,
pi - pm->plugin_info);
}