Commit f752be9c authored by Josh Hay's avatar Josh Hay Committed by Jeff Kirsher

ixgbe: fix potential null dereference

This patch adds a default case which goes to the next loop iteration
in the case where p is not set, preventing p from being dereferenced.
Signed-off-by: default avatarJosh Hay <joshua.a.hay@intel.com>
Tested-by: default avatarPhil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 07ce870b
......@@ -1040,6 +1040,9 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev,
p = (char *) adapter +
ixgbe_gstrings_stats[i].stat_offset;
break;
default:
data[i] = 0;
continue;
}
data[i] = (ixgbe_gstrings_stats[i].sizeof_stat ==
......
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