Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 37640703 authored by Mariusz Kozlowski's avatar Mariusz Kozlowski Committed by David S. Miller
Browse files

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

parent f8796654
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -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,