From: Ben Pfaff Date: Mon, 16 May 2011 20:22:05 +0000 (-0700) Subject: netdev-linux: Initialize rx_compressed, tx_compressed when converting. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7afa4f1d98d26066c66572f5af3d433ae9d18bb9;p=openvswitch netdev-linux: Initialize rx_compressed, tx_compressed when converting. rtnl_link_stats64 has rx_compressed and tx_compressed members that struct netdev_stats lacks, so we need to initialize them to zero when converting. Found by valgrind. --- diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 5f13f18a..c41b19d6 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -3976,6 +3976,8 @@ netdev_stats_to_rtnl_link_stats64(struct rtnl_link_stats64 *dst, const struct netdev_stats *src) { COPY_NETDEV_STATS; + dst->rx_compressed = 0; + dst->tx_compressed = 0; } /* Utility functions. */