summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2013-09-25 13:41:21 -0500
committerDan Williams <dcbw@redhat.com>2013-09-25 13:51:03 -0500
commit024f7e10b27319f41e97a046d2c468892479bba8 (patch)
tree0d80333badf4d9c71d9a5bab00dc7cebcae24e3c
parent49599367045e8523eee4929b0af559cadc02b54a (diff)
downloadNetworkManager-024f7e10b27319f41e97a046d2c468892479bba8.tar.gz
trivial: fix uninitialized bytes in ethtool driver name lookup
If the interface doesn't have an ethtool driver name, then '.driver' will never be touched and (*drvinfo.driver) will access uninitialized bytes.
-rw-r--r--src/platform/nm-linux-platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
index 5b5cbc04c6..dd8bf63263 100644
--- a/src/platform/nm-linux-platform.c
+++ b/src/platform/nm-linux-platform.c
@@ -536,7 +536,7 @@ link_is_software (struct rtnl_link *link)
static const char *
ethtool_get_driver (const char *ifname)
{
- struct ethtool_drvinfo drvinfo;
+ struct ethtool_drvinfo drvinfo = { 0 };
drvinfo.cmd = ETHTOOL_GDRVINFO;
if (!ethtool_get (ifname, &drvinfo))