diff options
| author | Mariusz Kozlowski <m.kozlowski@tuxland.pl> | 2007-07-31 17:06:45 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2007-07-31 17:06:45 -0400 |
| commit | 376407039c26caacc3e433437d25516ba8f3adc9 (patch) | |
| tree | a00e2680ca45584415c692d0aed3346c2b77ba3c | |
| parent | f87966541ef15d28572c8a3caaec359801625228 (diff) | |
[IPV4] ip_options.c: kmalloc + memset conversion to kzalloc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | net/ipv4/ip_options.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c index 251346828cb4..2f14745a9e1f 100644 --- a/net/ipv4/ip_options.c +++ b/net/ipv4/ip_options.c | |||
| @@ -513,11 +513,8 @@ void ip_options_undo(struct ip_options * opt) | |||
| 513 | 513 | ||
| 514 | static struct ip_options *ip_options_get_alloc(const int optlen) | 514 | static struct ip_options *ip_options_get_alloc(const int optlen) |
| 515 | { | 515 | { |
| 516 | struct ip_options *opt = kmalloc(sizeof(*opt) + ((optlen + 3) & ~3), | 516 | return kzalloc(sizeof(struct ip_options) + ((optlen + 3) & ~3), |
| 517 | GFP_KERNEL); | 517 | GFP_KERNEL); |
| 518 | if (opt) | ||
| 519 | memset(opt, 0, sizeof(*opt)); | ||
| 520 | return opt; | ||
| 521 | } | 518 | } |
| 522 | 519 | ||
| 523 | static int ip_options_get_finish(struct ip_options **optp, | 520 | static int ip_options_get_finish(struct ip_options **optp, |
