瀏覽代碼

Fix uninitialized memory. Spotted by valgrind


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1788 fd59a12c-fef9-0310-b244-a6a79926bd2f
Fabio M. Di Nitto 17 年之前
父節點
當前提交
39c4b8b1b6
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      exec/totemip.c

+ 1 - 0
exec/totemip.c

@@ -406,6 +406,7 @@ int totemip_iface_check(struct totem_ip_address *bindnet,
         memset(&nladdr, 0, sizeof(nladdr));
         nladdr.nl_family = AF_NETLINK;
 
+        memset(&req, 0, sizeof(req));
         req.nlh.nlmsg_len = sizeof(req);
         req.nlh.nlmsg_type = RTM_GETADDR;
         req.nlh.nlmsg_flags = NLM_F_ROOT|NLM_F_MATCH|NLM_F_REQUEST;