aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ah6.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2006-11-17 09:14:37 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:23:58 -0500
commitaf879cc704372ef762584e916129d19ffb39e844 (patch)
tree09b9cdb70bd6038513792b647b1c93332ce8ee14 /net/ipv6/ah6.c
parentc67862403e28dd67f38e896736f063d8dd522688 (diff)
[IPV6]: Use kmemdup
Code diff stats: [acme@newtoy net-2.6.20]$ codiff /tmp/ipv6.ko.before /tmp/ipv6.ko.after /pub/scm/linux/kernel/git/acme/net-2.6.20/net/ipv6/ip6_output.c: ip6_output | -52 ip6_append_data | +2 2 functions changed, 2 bytes added, 52 bytes removed /pub/scm/linux/kernel/git/acme/net-2.6.20/net/ipv6/addrconf.c: addrconf_sysctl_register | -27 1 function changed, 27 bytes removed /pub/scm/linux/kernel/git/acme/net-2.6.20/net/ipv6/tcp_ipv6.c: tcp_v6_syn_recv_sock | -32 tcp_v6_parse_md5_keys | -24 2 functions changed, 56 bytes removed /tmp/ipv6.ko.after: 5 functions changed, 2 bytes added, 135 bytes removed [acme@newtoy net-2.6.20]$ Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/ipv6/ah6.c')
-rw-r--r--net/ipv6/ah6.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c
index 2d9e495cf691..12c5a4dec09e 100644
--- a/net/ipv6/ah6.c
+++ b/net/ipv6/ah6.c
@@ -354,10 +354,9 @@ static int ah6_input(struct xfrm_state *x, struct sk_buff *skb)
354 if (!pskb_may_pull(skb, ah_hlen)) 354 if (!pskb_may_pull(skb, ah_hlen))
355 goto out; 355 goto out;
356 356
357 tmp_hdr = kmalloc(hdr_len, GFP_ATOMIC); 357 tmp_hdr = kmemdup(skb->nh.raw, hdr_len, GFP_ATOMIC);
358 if (!tmp_hdr) 358 if (!tmp_hdr)
359 goto out; 359 goto out;
360 memcpy(tmp_hdr, skb->nh.raw, hdr_len);
361 if (ipv6_clear_mutable_options(skb->nh.ipv6h, hdr_len, XFRM_POLICY_IN)) 360 if (ipv6_clear_mutable_options(skb->nh.ipv6h, hdr_len, XFRM_POLICY_IN))
362 goto free_out; 361 goto free_out;
363 skb->nh.ipv6h->priority = 0; 362 skb->nh.ipv6h->priority = 0;