Commit 024f7e10 authored by Dan Williams's avatar Dan Williams

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.
parent 49599367
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment