Browse Source

2005-10-01 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

	* rt_netlink.c: (netlink_request) Use memset to clear structure
	  before calling sendto (eliminates a valgrind error message about
	  uninitialized data).
ajs 14 years ago
parent
commit
c05612b9a7
2 changed files with 6 additions and 0 deletions
  1. 5 0
      zebra/ChangeLog
  2. 1 0
      zebra/rt_netlink.c

+ 5 - 0
zebra/ChangeLog

@@ -1,3 +1,8 @@
+2005-10-01 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+	* rt_netlink.c: (netlink_request) Use memset to clear structure
+	  before calling sendto (eliminates a valgrind error message about
+	  uninitialized data).
 
 2005-09-28 Alain Ritoux <alain.ritoux@6wind.com>
 

+ 1 - 0
zebra/rt_netlink.c

@@ -281,6 +281,7 @@ netlink_request (int family, int type, struct nlsock *nl)
   memset (&snl, 0, sizeof snl);
   snl.nl_family = AF_NETLINK;
 
+  memset (&req, 0, sizeof req);
   req.nlh.nlmsg_len = sizeof req;
   req.nlh.nlmsg_type = type;
   req.nlh.nlmsg_flags = NLM_F_ROOT | NLM_F_MATCH | NLM_F_REQUEST;