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:
@@ -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))
|
||||
|
Reference in New Issue
Block a user