提交 37640703 编写于 作者: M Mariusz Kozlowski 提交者: David S. Miller

[IPV4] ip_options.c: kmalloc + memset conversion to kzalloc

Signed-off-by: NMariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f8796654
......@@ -513,11 +513,8 @@ void ip_options_undo(struct ip_options * opt)
static struct ip_options *ip_options_get_alloc(const int optlen)
{
struct ip_options *opt = kmalloc(sizeof(*opt) + ((optlen + 3) & ~3),
return kzalloc(sizeof(struct ip_options) + ((optlen + 3) & ~3),
GFP_KERNEL);
if (opt)
memset(opt, 0, sizeof(*opt));
return opt;
}
static int ip_options_get_finish(struct ip_options **optp,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册