summaryrefslogtreecommitdiffstats
path: root/src/plugins/nsh
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2022-08-23 16:54:53 +0000
committerAndrew Yourtchenko <ayourtch@gmail.com>2022-08-26 13:11:14 +0000
commitc8d1c8cfb80f1cf0d6dc128e9beea3fcb5c3d741 (patch)
tree6fc83aaf39edc7a3ea4970f54b1df9f5577ac8ba /src/plugins/nsh
parent000a4ebed7d4097b88869a336a311f49873f8cf7 (diff)
nsh: fix coverity 249201
Zero-initialize the temporary struct, else a->map.adj_index is being used unset. Type: fix Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> Change-Id: Ia02636ea1e911250d6aa5e413de48e1e09863880
Diffstat (limited to 'src/plugins/nsh')
-rw-r--r--src/plugins/nsh/nsh_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/nsh/nsh_api.c b/src/plugins/nsh/nsh_api.c
index 670a4ee0b03..da6650dac7c 100644
--- a/src/plugins/nsh/nsh_api.c
+++ b/src/plugins/nsh/nsh_api.c
@@ -169,7 +169,7 @@ vl_api_nsh_add_del_map_t_handler (vl_api_nsh_add_del_map_t * mp)
{
vl_api_nsh_add_del_map_reply_t *rmp;
int rv;
- nsh_add_del_map_args_t _a, *a = &_a;
+ nsh_add_del_map_args_t _a = { 0 }, *a = &_a;
u32 map_index = ~0;
a->is_add = mp->is_add;