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.
This commit is contained in:
Dan Williams
2013-09-25 13:41:21 -05:00
parent 4959936704
commit 024f7e10b2

View File

@@ -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))