diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vat/plugin.c | 2 | ||||
-rw-r--r-- | src/vpp/api/plugin.c | 2 |
2 files changed, 2 insertions, 2 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); } diff --git a/src/vpp/api/plugin.c b/src/vpp/api/plugin.c index 410d497a0aa..3d89161cb86 100644 --- a/src/vpp/api/plugin.c +++ b/src/vpp/api/plugin.c @@ -161,6 +161,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->filename = file_name; pi->file_info = statb; @@ -172,7 +173,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); } |