nsh: fix coverity 249169 38/36938/1
authorAndrew Yourtchenko <ayourtch@gmail.com>
Thu, 18 Aug 2022 12:02:53 +0000 (12:02 +0000)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Thu, 18 Aug 2022 12:03:25 +0000 (12:03 +0000)
Zero-initialize the temporary struct on stack.

Type: fix
Change-Id: I651f87deeb79c6c073d5c510435fa268893a3b0e
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
src/plugins/nsh/nsh_api.c

index 4a9eab4..670a4ee 100644 (file)
@@ -550,7 +550,7 @@ static void vl_api_nsh_add_del_entry_t_handler
 {
   vl_api_nsh_add_del_entry_reply_t *rmp;
   int rv;
-  nsh_add_del_entry_args_t _a, *a = &_a;
+  nsh_add_del_entry_args_t _a = { 0 }, *a = &_a;
   u32 entry_index = ~0;
   u8 tlvs_len = 0;
   u8 *data = 0;