OSDN Git Service

ipv6: sr: Use kmemdup instead of duplicating it in parse_nla_srh
authorYueHaibing <yuehaibing@huawei.com>
Mon, 23 Jul 2018 08:33:19 +0000 (16:33 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Jul 2018 16:39:07 +0000 (09:39 -0700)
commit7fa41efac14ffbe8db7660ad2da3928969d10caf
treeb051350ed5159074f9061128e528d7167fe9b1f4
parentf8b2990fd91ecf66ee030da26de8336b28d3e1aa
ipv6: sr: Use kmemdup instead of duplicating it in parse_nla_srh

Replace calls to kmalloc followed by a memcpy with a direct call to
kmemdup.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/seg6_local.c