diff options
author | Shan Wei <shanwei@cn.fujitsu.com> | 2011-03-07 10:11:34 +0800 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2011-03-15 09:36:49 +0900 |
commit | 6060c74a3de8ed142c78133e2829e74711f77387 (patch) | |
tree | f8c9ee782481774229e3e92df3b77021238e65c2 /net/netfilter/ipvs/ip_vs_sync.c | |
parent | 4a569c0c0f833adace1e3aadaa38780ec2fcdf9e (diff) | |
download | op-kernel-dev-6060c74a3de8ed142c78133e2829e74711f77387.zip op-kernel-dev-6060c74a3de8ed142c78133e2829e74711f77387.tar.gz |
netfilter:ipvs: use kmemdup
The semantic patch that makes this output is available
in scripts/coccinelle/api/memdup.cocci.
More information about semantic patching is available at
http://coccinelle.lip6.fr/
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'net/netfilter/ipvs/ip_vs_sync.c')
-rw-r--r-- | net/netfilter/ipvs/ip_vs_sync.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c index fecf24d..c5d13b0 100644 --- a/net/netfilter/ipvs/ip_vs_sync.c +++ b/net/netfilter/ipvs/ip_vs_sync.c @@ -697,13 +697,12 @@ ip_vs_conn_fill_param_sync(struct net *net, int af, union ip_vs_sync_conn *sc, return 1; } - p->pe_data = kmalloc(pe_data_len, GFP_ATOMIC); + p->pe_data = kmemdup(pe_data, pe_data_len, GFP_ATOMIC); if (!p->pe_data) { if (p->pe->module) module_put(p->pe->module); return -ENOMEM; } - memcpy(p->pe_data, pe_data, pe_data_len); p->pe_data_len = pe_data_len; } return 0; |