Skip to content

Commit

Permalink
net: clear heap allocation for ethtool_get_regs()
Browse files Browse the repository at this point in the history
There is a conflict between commit b00916b and a77f5db. This patch resolves
the conflict by clearing the heap allocation in ethtool_get_regs().

Cc: stable@kernel.org
Signed-off-by: Eugene Teo <eugeneteo@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eugene Teo authored and David S. Miller committed Jan 25, 2011
1 parent d80bc0f commit b7c7d01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ static int ethtool_get_regs(struct net_device *dev, char __user *useraddr)
if (regs.len > reglen)
regs.len = reglen;

regbuf = vmalloc(reglen);
regbuf = vzalloc(reglen);
if (!regbuf)
return -ENOMEM;

Expand Down

0 comments on commit b7c7d01

Please sign in to comment.