dns: fix coverity 249189, 249198 39/36939/2
authorAndrew Yourtchenko <ayourtch@gmail.com>
Thu, 18 Aug 2022 12:17:05 +0000 (12:17 +0000)
committerMatthew Smith <mgsmith@netgate.com>
Thu, 18 Aug 2022 14:09:20 +0000 (14:09 +0000)
Zero-initialize the temporary struct on stack.

Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I89ced4cca8e832827fe054e2e60986de5910360c

src/plugins/dns/dns.c

index ac6d122..1839379 100644 (file)
@@ -1370,7 +1370,7 @@ vl_api_dns_resolve_name_t_handler (vl_api_dns_resolve_name_t * mp)
   dns_main_t *dm = &dns_main;
   vl_api_dns_resolve_name_reply_t *rmp;
   dns_cache_entry_t *ep = 0;
-  dns_pending_request_t _t0, *t0 = &_t0;
+  dns_pending_request_t _t0 = { 0 }, *t0 = &_t0;
   int rv;
   dns_resolve_name_t rn;
 
@@ -1416,7 +1416,7 @@ vl_api_dns_resolve_ip_t_handler (vl_api_dns_resolve_ip_t * mp)
   int i, len;
   u8 *lookup_name = 0;
   u8 digit, nybble;
-  dns_pending_request_t _t0, *t0 = &_t0;
+  dns_pending_request_t _t0 = { 0 }, *t0 = &_t0;
 
   if (mp->is_ip6)
     {