netdev-linux: Initialize rx_compressed, tx_compressed when converting.
authorBen Pfaff <blp@nicira.com>
Mon, 16 May 2011 20:22:05 +0000 (13:22 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 16 May 2011 20:22:05 +0000 (13:22 -0700)
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.

lib/netdev-linux.c

index 5f13f18a404cd07a1f5610b15b2d33ab7cf007b0..c41b19d6917cef78449754d29c6da860972b2938 100644 (file)
@@ -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;
 }
 \f
 /* Utility functions. */