From c8d1c8cfb80f1cf0d6dc128e9beea3fcb5c3d741 Mon Sep 17 00:00:00 2001 From: Andrew Yourtchenko Date: Tue, 23 Aug 2022 16:54:53 +0000 Subject: 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 Change-Id: Ia02636ea1e911250d6aa5e413de48e1e09863880 --- src/plugins/nsh/nsh_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/nsh') 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; -- cgit 1.2.3-korg